class_docstr: Collective all-gather communication.
class_docstr_tok: ["Collective","all-gather","communication","."]
code: def backward(self, inputs, grad_outputs):
      xp = backend.get_array_module(*inputs)
      grad_dtype = grad_outputs[0].dtype
  
      # convert to float32 for communication
      if numpy.float16 == grad_dtype:
          grad_outputs = tuple(
              [item.astype(numpy.float32) for item in grad_outputs]
          )
      gxs = self.comm.alltoall(grad_outputs)
  
      gx = xp.stack(gxs).sum(axis=0)
  
      # convert back
      if numpy.float16 == grad_dtype:
          gx = gx.astype(grad_dtype)
      return (gx,)
  
imports: import chainer
  from chainer import backend
  import numpy
label_desc: Use image node_id 3 for calling the AllGather obj's underlying member method code with example usage: obj.backward(inputs, grad_outputs) and returns: gx