7c66f36ed6a6f4e26d43ff0571a54c312253b4a3,optuna/integration/pytorch_ddp.py,DDPTrial,_call_and_communicate,#DDPTrial#Any#Any#,182
Before Change
result = func()
buffer[0] = result
dist.broadcast(buffer, src=0)
return buffer.cpu().numpy().tolist()[0]
else:
dist.broadcast(buffer, 0)
return buffer.cpu().numpy().tolist()[0]
After Change
if dist.get_rank() == 0:
result = func()
buffer[0] = result
if dist.get_backend() == "nccl":
buffer = buffer.cuda()
dist.broadcast(buffer, src=0)
return buffer.cpu().numpy().tolist()[0]
def _call_and_communicate_obj(self, func: Callable) -> Any:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: pfnet/optuna
Commit Name: 7c66f36ed6a6f4e26d43ff0571a54c312253b4a3
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_ddp.py
Class Name: DDPTrial
Method Name: _call_and_communicate
Project Name: pfnet/optuna
Commit Name: 7c66f36ed6a6f4e26d43ff0571a54c312253b4a3
Time: 2021-02-17
Author: toshihiko.yanase@gmail.com
File Name: optuna/integration/pytorch_ddp.py
Class Name: DDPTrial
Method Name: _call_and_communicate_obj
Project Name: deepfakes/faceswap
Commit Name: 3c9a0f9e53742ae95b394e2016b1a3a391049d77
Time: 2021-03-01
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/model/layers.py
Class Name: KResizeImages
Method Name: call