I have 4 cores + CUDA supported graphics card. Is this equivalent to 5 cores?

2 views (last 30 days)
I want to maximize my computer's resources for using parallel computing, probably using spmd. I have 4 cores and a CUDA-supported graphics card, through gpuArray. Does this mean that I can use 5 cores, or does the gpu also require a core from the start?
If this is equivalent to 5 cores, how can I use these?
Thank you

Accepted Answer

Matt J
Matt J on 1 Jan 2013
Edited: Matt J on 2 Jan 2013
No, the kinds of computations that a GPU can do is different from a CPU, and therefore it cannot function like an additional CPU core. The GPU actually contains many hundred cores of its own, but these cores are specialized, capable of only very simple operations. You can only use the graphics card in conjunction with gpuArray.
Matt J
Matt J on 3 Jan 2013
As far as I understand, if you were to start a gpu calculation, and then were to start smpd, then the gpu and the smpd could potentially run in parallel, with you gathering the gpu results after the smpd session finished. But if you are not using a .cu to supply a kernel that can run for a fair while by itself, then the gpu would run out things to do, as there is no "master session" running beside the smpd sessions and keeping the gpu fed.
That seems very strange to me if you can do that. Wouldn't you need some kind of M-code version of _syncthreads() that you could call from your mfile to make sure that both the SPMD and gpu operations are simultaneously finished before proceeding?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!