Is it possible to take advantage of multi-core CPU parallelism while using CUDA? Considering using C

Hello,

I’m new to the forums and am trying to gain a better understanding of the CUDA architecture and its use. I searched through the forums but have not found an answer to my question(s): Is it possible to make use of the CUDA functions while at the same time creating independent tasks to be processed by individual CPU cores? I looked into OpenCL and it supposedly can execute tasks across both CPU cores and GPU cores simultaneously. Would losing any benefits gained from using CUDA be worth making good use of the CPU? Is there any other way to accomplish this? Would you recommend one way over another or am I just completely misunderstanding my options here? :laugh: Thank you for any advice/suggestions/well-deserved tech-scoldings.

Check this and this.

Thank you!

Commonly CUDA is used for code that runs 5x or more faster on the GPU than on the CPU, so you only gain marginal improvements by dividing work between CPU(s) and GPU. So you would rather use CPUs for parts that do not run well on CUDA. For this use CPU parallelism can be useful (and I use it all the time).

The exception are laptop GPUs which usually are about as fast as the laptop CPU, so by using both in parallel you can gain a factor of two in speed.