1082ba352c5f1d524b1fcba43ee611280b169224,fairseq/distributed_utils.py,,distributed_init,#Any#,19

Before Change


            backend=args.distributed_backend, init_method=args.distributed_init_method,
            world_size=args.distributed_world_size)

    args.distributed_rank = torch.distributed.get_rank()
    if not is_master(args):
        suppress_output()

    return args.distributed_rank

After Change


    if args.distributed_world_size == 1:
        raise ValueError("Cannot initialize distributed with distributed_world_size=1")

    if _use_c10d[0] is None:
        _use_c10d[0] = not args.no_c10d

    if _use_c10d[0] and not hasattr(torch.nn.parallel, "_DistributedDataParallelC10d"):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: elbayadm/attn2d
Commit Name: 1082ba352c5f1d524b1fcba43ee611280b169224
Time: 2018-09-25
Author: edunov@apache.org
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: distributed_init


Project Name: deepinsight/insightface
Commit Name: 0cc88e2a2449973e77dbdd417c9ec97ef03940b9
Time: 2021-03-21
Author: anxiangsir@outlook.com
File Name: recognition/arcface_torch/train.py
Class Name:
Method Name: main