How do I clear GPU memory on a multi-GPU system?
3 views (last 30 days)
Show older comments
Currently, I use reset(gpuDevice(#)) to clear my GPUs, which I am using in spmd-end. reset(gpuDevice(1)) works fine. However, reset(gpuDevice(2)) and any #>1 just freezes and cannot be stopped once run.
So can I assume that reset cannot work on gpuDevices that are above the main one? How do I clear memory in the other GPUs?
2 Comments
Jill Reese
on 12 Jul 2012
I haven't been able to reproduce this issue; I am able to reset both of my GPUs using version R2012a (both inside and outside the spmd block).
What version of MATLAB are you using? Are you executing reset(gpuDevice(#)) inside or outside the spmd block? Is your matlabpool size the same as the number of GPUs you are using? Could you provide a bit of MATLAB code showing exactly what you have tried?
Answers (0)
See Also
Categories
Find more on Get Started with GPU Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!