Replies: 1 comment 1 reply
-
Thanks for starting the discussion. This is something which I wanted to add to PyG long time ago. For allowing for key, value in data:
if isinstance(value, Tensor):
value.record_stream(...) Let me know if you have any interest in contributing this feature. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Tensor prefetching using Pytorch is relatively simple, and is done by something like:
Here, upcoming batches of data are put on a
cuda stream
and are pre-loaded on the GPU while the current batch is returned.This makes use of
torch.Tensor.record_stream()
(https://pytorch.org/docs/stable/generated/torch.Tensor.record_stream.html) but PyG graph data does not have such a method. Does anyone know an alternative for pre-loading graph data onto the GPU?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions