I am trying to scatter boolean tensor but failed with error: Invalid scalar type while it works well with dtype=uint8. could anyone help on this?
torch version: 1.13.0+cu117
def worker(rank, world_size):
...
dtype = th.uint8
dtype = th.bool
scatter_list = [ th.tensor([True, True, True, True], dtype=dtype) for _ in range(4) ]
gather_list = [ th.tensor([False, False, False, False], dtype=dtype) for _ in range(4) ]
for i in range(world_size):
dist.scatter(gather_list[i], scatter_list if i == rank else [], src=i)
File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/distributed/distributed_c10d.py", line 2290, in scatter
work.wait()
RuntimeError: Invalid scalar type