48d9afbeb37584586411c3d8e53d91228528dec4,fairseq/distributed_utils.py,,all_gather_list,#Any#Any#Any#,106
Before Change
raise ValueError("encoded data exceeds max_size: {}".format(enc_size + 2))
assert max_size < 255*256
buffer_rank = buffer[rank * max_size : (rank + 1) * max_size]
buffer_rank[0] = enc_size // 255 // this encoding works for max_size < 65k
buffer_rank[1] = enc_size % 255
buffer_rank[2:enc_size+2] = torch.ByteTensor(list(enc))
After Change
cpu_buffer[2 : enc_size + 2] = torch.ByteTensor(list(enc))
start = rank * max_size
size = enc_size + 2
buffer[start : start + size].copy_(cpu_buffer[:size])
all_reduce(buffer, group=group)
try:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: elbayadm/attn2d
Commit Name: 48d9afbeb37584586411c3d8e53d91228528dec4
Time: 2019-03-14
Author: myleott@fb.com
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: all_gather_list
Project Name: allenai/allennlp
Commit Name: 8229aca3be784ae3af5cd4edec2749124e6b6cba
Time: 2020-07-06
Author: reiyw.setuve@gmail.com
File Name: allennlp/nn/initializers.py
Class Name: PretrainedModelInitializer
Method Name: __call__