55b431b17aba504ae7b75f6f97b4437101e50f38,torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py,,allreduce_hook,#Any#Any#,5

Before Change


        >>> ddp_model.register_comm_hook(process_group, allreduce_hook)
    
    group_to_use = process_group if process_group is not None else dist.group.WORLD
    world_size = (
        process_group.size() if process_group is not None else dist.get_world_size()
    )

    tensor = bucket.get_tensors()[0]
    fut = dist.all_reduce(tensor, group=group_to_use, async_op=True).get_future()

After Change


        >>> ddp_model.register_comm_hook(process_group, allreduce_hook)
    
    group_to_use = process_group if process_group is not None else dist.group.WORLD
    world_size = group_to_use.size()

    tensor = bucket.get_tensors()[0]
    fut = dist.all_reduce(tensor, group=group_to_use, async_op=True).get_future()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 7

Instances


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py
Class Name:
Method Name: allreduce_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py
Class Name:
Method Name: powerSGD_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/quantization_hooks.py
Class Name:
Method Name: quantization_perchannel_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py
Class Name:
Method Name: _allgather_then_aggregate_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py
Class Name:
Method Name: fp16_compress_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py
Class Name:
Method Name: batched_powerSGD_hook


Project Name: pytorch/pytorch
Commit Name: 55b431b17aba504ae7b75f6f97b4437101e50f38
Time: 2020-12-22
Author: wayi@fb.com
File Name: torch/distributed/algorithms/ddp_comm_hooks/quantization_hooks.py
Class Name:
Method Name: quantization_pertensor_hook