Profiling Info for a command?
I am trying to measure the execution time of a command using profiling info.
This is my code
ciErr=clEnqueueNDRangeKernel(cqCommandQueue,ckKern el,1,NULL,&szGlobalWorkSize,NULL,0,NULL,profEvent) ;
printf("\nTime after profiling in SUB is \t\t%Ld",timeStart-timeStop);
As per the stuff found over net, this should work fine, but I am getting the following output
Time after profiling in SUB is 6492816
error -58 in NDRANget
Now -58 indicates invalid event and I am unable to figure this thing out how to get the event working?
Please show me how to correct this problem?
A couple of comments:
- It looks like you are missing an ampersand in your clEnqueueNDRangeKernel call. The last parameter to that function is a pointer to a cl_event, not the cl_event directly.
- Make sure you create the command queue with the CL_QUEUE_PROFILING_ENABLE flag. Perhaps you're already doing this already, just want to make sure...
Hope this helps!
Tags for this Thread