d3795d6cd1c66ac05dc0f4861ce69ab4680bff3d,fairseq/distributed_utils.py,,all_gather_list,#Any#Any#,102
Before Change
out_buffers = all_gather_list._out_buffers
enc = pickle.dumps(data)
if len(enc) >= max_size:
raise ValueError("encoded data exceeds max_size: {}".format(len(enc)))
in_buffer[0] = len(enc)
in_buffer[1:len(enc)+1] = torch.ByteTensor(list(enc))
torch.distributed.all_gather(out_buffers, in_buffer.cuda())
After Change
result = []
for i in range(world_size):
out_buffer = out_buffers[i]
size = (255 * utils.item(out_buffer[0])) + utils.item(out_buffer[1])
result.append(
pickle.loads(bytes(out_buffer[2:size+2].tolist()))
)
return result
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: pytorch/fairseq
Commit Name: d3795d6cd1c66ac05dc0f4861ce69ab4680bff3d
Time: 2018-04-02
Author: myleott@fb.com
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: all_gather_list
Project Name: arraiy/torchgeometry
Commit Name: ab9c4f8474ca744c7e67822fa21d408d0b0ae2d0
Time: 2020-04-18
Author: sj8716643@126.com
File Name: kornia/augmentation/functional.py
Class Name:
Method Name: apply_rotation