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)))