cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

shankha
Journeyman III

Figuring compilation time :timing clBuildProgram

Hi,
I was trying to figure the time taken to compile OpenCL code through AMD's OpenCL compiler on windows. Does the clBuildProgram handles all the job of (compiling & linking) or it offloads some of it's functionalities to clEnqueueNDRangeKernel, clCreateKernel or any other API.

Thanks
Gudge

0 Likes
4 Replies
nou
Exemplar

clBuildprogram should build program fully. but you can try add clCreateKernel too.

0 Likes

Originally posted by: nou clBuildprogram should build program fully. but you can try add clCreateKernel too.

I looked at the OpenCL-spec for clCreateKernel.  The documentation says it creates a kernel object. are there any documents which will give me more details about what exactly constitues creating kernel object. How it is diffirent from clBuildprogram.

0 Likes
himanshu_gautam
Grandmaster

I think that detail may change from one implementation to another. Although from my experiments with opencl i am sure that atleast the compilation of kernels happens in that function.

0 Likes

shankha,
A clprogram represents the whole compilation unit, compilation is not required at this point, a clkernel is just the specific kernel that is specified and all relevant functions. As himanshu stated, what happens in each situation is implementation defined but because of the error messages that are unique to each function, you should be able to have an idea for what needs to have occurred by the point.

0 Likes