genrl
genrl copied to clipboard
CUDA support Agents
Is this still an issue?
I'll resolve it while working on Off Policy Agents.
For this, we just need to check for CUDA support on the system and then use the CUDA functions for computation right?
Yes. Just ensure things that can be on the GPU, are on the GPU. E.g. Agents, Tensors in the Buffers and random tensors in the Trainers (there should not be a lot of them though).
If you go through a few agents, you'll see that there's a bunch of sporadic cpu calls which would disrupt that. So I think thats the only other thing to be careful about that.
Let me know if you're planning to take it up or if you need more info about this.
I'll raise a PR with some initial changes and we'll take it from there?
Sounds good!
On 02-Sep-2020, at 8:31 PM, IshanDaga [email protected] wrote:
I'll raise a PR with some initial changes and we'll take it from there?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SforAiDl/genrl/issues/162#issuecomment-685794835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH72FJY4HQUSVDGQQKYYXWDSDZM57ANCNFSM4NXWOCWA.
Still working on this @IshanDaga ?
Nope. Not at the moment
Yes. Just ensure things that can be on the GPU, are on the GPU. E.g.
Agents, Tensors in theBuffersand randomtensorsin theTrainers(there should not be a lot of them though).If you go through a few agents, you'll see that there's a bunch of sporadic
cpucalls which would disrupt that. So I think thats the only other thing to be careful about that.Let me know if you're planning to take it up or if you need more info about this.
Would it be better to -
- Add a separate arg to the buffers, giving a choice to where to place them (ie GPU or CPU)
- after sampling the list of tensors from the buffer, send these tensors to the GPU
I think 2 would be slower since we'd have to do a CPU-GPU transfer on every update step, but not sure if 1 is tractable as the buffer size grows larger