-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FSDP] Add support for FSDPCommContext
on PrivateUse1 backend
#138687
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138687
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 1998fe1 with merge base 72dde6e (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
I am ok with this change. Let me know if any of the PrivateUse1 do not support streams and have a comment about this. |
@@ -51,7 +51,7 @@ class FSDPCommContext: | |||
|
|||
def lazy_init(self, device: torch.device): | |||
self.device_handle = _get_device_handle(device.type) | |||
if device.type not in ["cuda", "hpu"]: | |||
if device.type not in ["cuda", "hpu", torch._C._get_privateuse1_backend_name()]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe NPU supports streams, but what about other privateuse1 backends?
cc: @FFFrog @noemotiovon
cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o