class_docstr: Collective all-to-all communication.
class_docstr_tok: ["Collective","all-to-all","communication","."]
code: def backward(self, inputs, grad_outputs):
      assert self.comm.size == len(grad_outputs)
  
      xs_dtype = inputs[0].dtype
  
      # convert to float32 for communication
      if numpy.float16 == xs_dtype:
          gys = tuple([gy.astype(numpy.float32) for gy in grad_outputs])
      else:
          gys = tuple([gy for gy in grad_outputs])
  
      ret = self.comm.alltoall(gys)
      # convert back
      if numpy.float16 == xs_dtype:
          ret = tuple([item.astype(xs_dtype) for item in ret])
      return ret
  
imports: import chainer
  from chainer import backend
  import numpy
label_desc: Use image node_id 3 for calling the AllToAll obj's underlying member method code with example usage: obj.backward(inputs, grad_outputs) and returns: ret