Skip to content

Commit

Permalink
[FSDP2] privateuse1 support fsdp2. (pytorch#139539)
Browse files Browse the repository at this point in the history
We are looking forward to supporting FSDP2 with devices other than CUDA. Please give me some coding suggestions. Thank you very much.

Pull Request resolved: pytorch#139539
Approved by: https://github.com/kwen2501
  • Loading branch information
will-core authored and pytorchmergebot committed Nov 15, 2024
1 parent b506d1c commit ee3a4f0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions torch/distributed/_composable/fsdp/_fsdp_param_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class FSDPCommContext:

def lazy_init(self, device: torch.device):
self.device_handle = _get_device_handle(device.type)
if device.type not in ["cuda", "hpu"]:
raise RuntimeError("FSDP requires streams support")
# Setting the all-gather/reduce-scatter streams to be higher priority
# can help avoid some issues where their copies in/out are delayed and
# block computation (this is different from high-pri NCCL streams)
Expand Down

0 comments on commit ee3a4f0

Please sign in to comment.