OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

CPU usage of runtime OpenCL

christolb29
Beginner
545 Views
Hello,
I am wondering if the runtime OpenCL consumes a significant CPU time? I mean, I am using the HD4000 to free the CPU of some computation which represents only 1-2% of the CPU usage of my process.
But in the end, the performance is worst. And I measure almost the same when I just call my setup_openCL() function and do not process this small computation at all.
Does it mean there is some kind of treshold in term of computation, below which one it's not efficient to use the GPU with OpenCL? (Memory transfert is not the problem here). Is there any way to fix this? (Besides doing more computation on the GPU).
Thank you,
Chris.
0 Kudos
2 Replies
Jim_Vaughn
Beginner
545 Views
"Does it mean there is some kind of treshold in term of computation, below which one it's not efficient to use the GPU with OpenCL?"
Yes but there is often much more you can do to get things to run faster such as, reorder and rework your code and/or algorithm.

You also have to remember that the HD4000 isn't an amazing GPU and will be faster for some things and not faster for others. The same thing is true for descreate GPUs however they are much higher performing cards.
Also you only want to setup opencl once and then run your kernel as many times as you need to. It is likely your setup is taking so long that you are not able to notice the execution of your kernel.
0 Kudos
christolb29
Beginner
545 Views
Thank you.
I make sure to setup OpenCL only once. I am aware that this GPU is not that powerful but it is not a problem, as all the computation I can run on it, instead of the CPU would be CPU timed gained.
The idea is to demonstrate it with an example, but so far the result is worst ^^'.
I will try to highlight this effect which is not insignificant for me, and transfert more computation on the GPU.
0 Kudos
Reply