def __init__(self, devices):
     self.devices = devices
     ptrs = (NcclComm * len(devices))()
     self._as_parameter_ = ptrs
     check_error(lib.ncclCommInitAll(self, len(devices), int_array(devices)))
示例#2
0
文件: nccl.py 项目: athiwatp/pytorch
 def __init__(self, devices):
     self.devices = devices
     ptrs = (NcclComm * len(devices))()
     self._as_parameter_ = ptrs
     check_error(lib.ncclCommInitAll(self, len(devices), int_array(devices)))