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.

Compilation Time!!

evk8888
Beginner
300 Views
Hello,
May be its not a right question to ask here but anyway i am posting.
I have the same OpenCL kernel and compilation time of the kernel take almost 10 times more time in a GPU compared to intel CPU.
Nvidia GPU0.19405 seconds!
Intel CPU 0.0290 seconds!

Does somebody have any insight.
is it may be because GPU compilation usually takes more time compared to CPUs...

Thanks

0 Kudos
2 Replies
greenkalx
Novice
300 Views


Are you sure the Nvidia compile did a full rebuild? I've found that it will cache previous build(s) with the same hash of the source file.
For example, if you undo some changes, or modify the file to the same as a previous build, a full rebuild will not be triggered.

One of my kernels takes more than 10 seconds to compile by Nvidia, but with Intel it is less than two seconds. (clBuildProgram) My results seem to vary though with Nvidia, so I am considering precompiling the .cl source to .ptx using clCreateProgramWithBinary rather than clCreateProgramWithSource.

0 Kudos
Jim_Vaughn
Beginner
300 Views
NVidia definately caches builds and this has been a discussion on this forum in the past. There seem to vary based on the content of the loops, for example Loop unrolling on the GPU expecially in AMD's compiler can take extreammly long when compiling or the GPU.
0 Kudos
Reply