lingvo.core.sendrecv module

Send/Recv ops.

The following _Send()/_Recv() are adapted from python op wrappers generated by python_op_gen_main. python_op_gen_main.cc’s PrintAllPythonOps needs to be updated to export internal ops.

lingvo.core.sendrecv._TpuCore(device)[source]

Returns the TPU core represented by <device>, or -1 if not TPU.

class lingvo.core.sendrecv.Channel(dtype, shape, send_device, recv_device, name=None)[source]

Bases: object

A communication channel to transfer tensors in order.

Send(tensor)[source]

Sends a tensor through the channel.

Recv()[source]

Receives a tensor from the channel.