# PersistentTensorDict send data to GPU without blocking the computations

**URL:** <https://discuss.pytorch.org/t/persistenttensordict-send-data-to-gpu-without-blocking-the-computations/224653>\
**Category:** distributed\
**Created:** [March 4, 2026, 6:20pm UTC](https://discuss.pytorch.org/t/persistenttensordict-send-data-to-gpu-without-blocking-the-computations/224653 "2026-03-04T18:20:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lsrosa](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/lsrosa/32/72820_2.png) [@lsrosa](https://discuss.pytorch.org/u/lsrosa)\
**Post date:** [March 4, 2026, 6:20pm UTC](https://discuss.pytorch.org/t/persistenttensordict-send-data-to-gpu-without-blocking-the-computations/224653/1 "2026-03-04T18:20:55Z")

</div>

I have a lot of data saved on `PersistentTensorDict`s (PTDs), which I send to the GPU for processing.

However, there is a lot of idle time between sending data (which is read from disc) to the GPU and writing it back.

I have been looking for a way to send batches of data from the PTDs to the GPU, while the GPU is processing the previous batch, so I can reduce the idle time.

I have found this [distributed example](https://docs.pytorch.org/tensordict/stable/distributed.html), which I thought I could make some workers for processing and others to send/read data, but I am failing to replicate the instructions there.

Does anyone have any indication or idea of which direction I should follow to solve this problem? Maybe a link with an example.

Best,
