Skip to content

Commit

Permalink
use determined device for device handle
Browse files Browse the repository at this point in the history
  • Loading branch information
medivh-xp committed May 17, 2023
1 parent 8ac84cd commit dd032d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions torch/distributed/fsdp/_init_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ def _init_device_handle(
"cuda", torch.cuda.current_device()
)

state._device_handle = _FSDPDeviceHandle.from_device(
torch.device("cuda", torch.cuda.current_device())
)
state._device_handle = _FSDPDeviceHandle.from_device(determined_device)
return state


Expand Down

0 comments on commit dd032d5

Please sign in to comment.