Skip to content

Support PyTorch builds without distributed support - #110

Open
anutosh491 wants to merge 1 commit into
google:mainfrom
anutosh491:support-pytorch-without-distributed
Open

anutosh491 wants to merge 1 commit into
google:mainfrom
anutosh491:support-pytorch-without-distributed

Conversation

@anutosh491

Copy link
Copy Markdown

Found this while getting PyTorch + TorchAX running in wasm64/JupyterLite, where our PyTorch build has USE_DISTRIBUTED=OFF.

TorchAX unconditionally imports functional collectives and registers distributed operators, which makes even single-device usage fail. This checks torch.distributed.is_available() before loading or using those components.

Although we caught this in our Wasm work, the fix applies to any PyTorch build with distributed support disabled. !

@anutosh491

Copy link
Copy Markdown
Author

Maybe @qihqi can help me with the reviews here ?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant