from tensorflow.python.framework import ops as _ops

    else:
      with _ops.device(self._send_device):
        return _XlaSend(
            tensor, tensor_name=self._name, name="Send_" + self._name)

  def Recv(self):
    """Receives a tensor from the channel."""
    if self._send_tpu_core == -1:
      return _Recv(self._dtype, self._name,
                   self._send_device, self._recv_device)
    else:
      with _ops.device(self._recv_device):
        return _XlaRecv(
            self._dtype,
            tensor_name=self._name,
            shape=self._shape,
            name="Recv_" + self._name)
