code: def bcast_data(self, model):
      for _, param in sorted(model.namedparams()):
          if param.data is not None:
              data = param.data
              tmp_cpu = chainer.cuda.to_cpu(data)
  
              is_float16 = tmp_cpu.dtype == np.float16
              if is_float16:
                  tmp_cpu = tmp_cpu.astype(np.float32)
  
              self.mpi_comm.Bcast(tmp_cpu)
              if is_float16:
                  tmp_cpu = tmp_cpu.astype(np.float16)
  
              xp = chainer.backend.get_array_module(data)
              if xp == chainerx:
                  # create the chainerx ndarray
                  tmp_gpu = chainerx.array(tmp_cpu, device=data.device)
              else:
                  tmp_gpu = chainer.cuda.to_gpu(tmp_cpu)
              data[:] = tmp_gpu
  
file_path: chainer/chainermn/communicators/non_cuda_aware_communicator.py
imports: import warnings
  import chainer.cuda
  import chainerx
  import math
  import mpi4py.MPI
  import numpy
  from chainermn.communicators import _communication_utility
  from chainermn.communicators import _memory_utility
  from chainermn.communicators import mpi_communicator_base
  from chainermn import nccl
label_desc: Use image node_id 4 for calling the NonCudaAwareCommunicator obj's underlying member method code with example usage: obj.bcast_data(model) without return types