class_docstr: Collective all-gather communication.
class_docstr_tok: ["Collective","all-gather","communication","."]
code: def forward(self, inputs):
      (x,) = inputs
      x_dtype = x.dtype
  
      # convert to float32 for communication
      if numpy.float16 == x_dtype:
          x = x.astype(numpy.float32)
      ret = self.comm.allgather(x)
  
      # convert back
      if numpy.float16 == x_dtype:
          ret = tuple([item.astype(x_dtype) for item in ret])
      return ret
  
imports: import chainer
  from chainer import backend
  import numpy
label_desc: Use image node_id 2 for calling the AllGather obj's underlying member method code with example usage: obj.forward(inputs) and returns: ret