def bcast_obj(self, obj, max_buf_len=256 * 1024 * 1024, root=0): if self._check_obj_type_for_chainerx(obj): raise ValueError('calling bcast_obj on chainerx \ with cuda is not supported') return chunked_bcast_obj(obj, self.mpi_comm, max_buf_len=max_buf_len, root=root)
def check_chunked_bcast_obj(self, data_size, max_buf_len): root = 0 obj = np.arange(data_size) src = None if self.communicator.rank == root: src = obj dst = chunked_bcast_obj(src, self.communicator.mpi_comm, max_buf_len, root) assert len(dst) == len(obj) for i in range(len(obj)): assert dst[i] == obj[i]
def check_chunked_bcast_obj(self, data_size, max_buf_len): root = 0 obj = np.arange(data_size) src = None if self.communicator.rank == root: src = obj dst = chunked_bcast_obj(src, self.communicator.mpi_comm, max_buf_len, root) assert len(dst) == len(obj) for i in range(len(obj)): assert dst[i] == obj[i]
def bcast_obj(self, obj, max_buf_len=256 * 1024 * 1024, root=0): return chunked_bcast_obj(obj, self.mpi_comm, max_buf_len=max_buf_len, root=root)
def bcast_obj(self, obj, max_buf_len=256 * 1024 * 1024, root=0): return chunked_bcast_obj(obj, self.mpi_comm, max_buf_len=max_buf_len, root=root)