Add GPU to the parallel pool

9 views (last 30 days)
Antonio Carlo Bertolino
Antonio Carlo Bertolino on 27 Oct 2017
Commented: Matt J on 27 Oct 2017
Hello, I would like to know if it were possible to use the GPU as if it were one of the processor cores, adding it into the pool as an extra worker. I'm thinking about it in order to use also the GPU in the calculation performed by the "parsim" command to speed up the simulations I need to do. Thanks in advance, kind regards Antonio

Accepted Answer

Matt J
Matt J on 27 Oct 2017
Edited: Matt J on 27 Oct 2017
This is only possible in the sense that, once you launch a gpuArray operation from one of the workers, MATLAB will carry on with any exclusively CPU operations on that worker without first waiting for the GPU operations to finish. When you're ready to claim the GPU results, you would use gather() to move them back to the host.
  2 Comments
Matt J
Matt J on 27 Oct 2017
No, the GPU cannot be used as an additional member of the parpool.

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown 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!