03-30-2012 06:28 AM
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...
05-14-2012 08:22 AM
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.
05-16-2012 04:23 PM
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.