Replies: 1 comment
-
I think this should already do the trick:
|
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am currently running a model with two iterations of forward/backward passes, each with a different batch size, on a single GPU. The process is currently sequential: (1) sample one batch with batch size 1, (2) sample another batch with batch size 2, (3) execute the model with the first sampled batch, and (4) execute the model with the second sampled batch. Each step waits for the previous one to be completed. The code looks like:
However, since sampling on the CPU takes longer than executing the forward and backward passes on the GPU, I am exploring the possibility of running them iteratively. For example, during step 2 (sampling with batch size 2) on the CPU, I want to concurrently run the model with batch size 1 on the GPU (step 3) in an asynchronous way. If this is possible, how can I achieve it in pyg? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions