6889773ea1f550042e37a219c63ee4f4200e983c,horovod/torch/functions.py,,broadcast_optimizer_state,#Any#Any#,61
Before Change
occurrences[name] += 1
key = "%s.%d" % (str(name), occurrences[name])
if not torch.is_tensor(p):
// Wrap the scalar in a FloatTensor, and remember its type
// so we can cast it back after unwrapping
t = type(p)
p = torch.Tensor([p])
callbacks[key] = _create_callback(pid, name, t, p)
params.append((key, p))
// Synchronized broadcast of all parameters
broadcast_parameters(params, root_rank)
After Change
return
params = []
scalars = {}
callbacks = {}
occurrences = collections.defaultdict(int)
// Returns the full type structure of the possibly nested objects for recursive casting back
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: horovod/horovod
Commit Name: 6889773ea1f550042e37a219c63ee4f4200e983c
Time: 2021-01-25
Author: tgaddair@gmail.com
File Name: horovod/torch/functions.py
Class Name:
Method Name: broadcast_optimizer_state
Project Name: apache/incubator-mxnet
Commit Name: d5fdcbf3bae3ea85cb89394147db4b1da0105fb4
Time: 2020-08-07
Author: linhaibin.eric@gmail.com
File Name: python/mxnet/gluon/trainer.py
Class Name: Trainer
Method Name: __init__
Project Name: ray-project/ray
Commit Name: 6373c706615bc94c0a1e7fc564b3d18c3d342d91
Time: 2020-04-30
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: create_backend