Skip to content

Commit

Permalink
Fix deprecation warning of using TypedStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodAxe committed Aug 21, 2023
1 parent 8427960 commit 30e3a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_toolbelt/utils/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def broadcast_from_master(data: Any) -> Any:

if local_rank == 0:
buffer = pickle.dumps(data)
storage = torch.ByteStorage.from_buffer(buffer)
storage = torch.UntypedStorage.from_buffer(buffer, dtype=torch.uint8)
payload = torch.ByteTensor(storage).to("cuda")
local_size = payload.numel()
else:
Expand Down

0 comments on commit 30e3a05

Please sign in to comment.