recv_tensordict#
- async tensordict._ucxx.recv_tensordict(endpoint, td: TensorDictBase | None = None, *, device: device | str | None = None) TensorDictBase#
Receive a TensorDict from a UCXX endpoint (stateless, always expects metadata).
Warning
recv_tensordictis experimental: its API can change in a minor release without a deprecation cycle.- Parameters:
endpoint – a UCXX endpoint object.
td – if provided and already consolidated, receives directly into its storage buffer (in-place update). Otherwise a new TensorDict is constructed.
- Keyword Arguments:
device – device on which to allocate the storage buffer. Defaults to CPU.
- Returns:
The received TensorDict.