embedding manual control location CPU vs GPU #6725
Unanswered
johngrabner
asked this question in
DDP / multi-GPU / multi-node
Replies: 1 comment
-
You should be able to move any tensors as you see fit with |
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.
-
I would like to create an embedding that does not fit in the GPU memory
but can fit in the CPU memory.
Select the subset for a batch, send it to the GPU at the start of mini-batch.
GPU_tensor = embedding(idx)
Then at the end of training update the CPU embedding from the GPU embedding.
I am using
pl.Trainer( gpus=[0,1], distributed_backend='ddp')
and probably will need accumulate_grad_batches
Any idea for how to do this ?
Beta Was this translation helpful? Give feedback.
All reactions