pavandsp

Profiling of the Code in OpenCL

Discussion created by pavandsp on Feb 3, 2010
Latest reply on Feb 4, 2010 by genaganna

Hi

I am trying to profile a simple (for loop)code in OpenCL.

I used clGetEventProfilingInfo to get the start and end time.But i am getting weired values start time=-1775338701 ,end time=19927,and the diff=start-end=1046102520 and the  param_value_size_ret=19939.

I called the api clGetEventProfilingInfo after clEnqueueNDRangekernel and clwaitForevents apis.

My Config=Linux Ubuntu 9.04,Intel CPU.

My Question is :1.How come start time is -ve

2.end time <start time.

psuedo profile code:

clGetEventProfilingInfo (events[0],CL_PROFILING_COMMAND_START,sizeof(cl_ulong,&starttime,&length));

clGetEventProfilingInfo (events[0],CL_PROFILING_COMMAND_END,sizeof(cl_ulong,&end time,&length));

cl_ulong diff=endtime-start time;

printf("start time=%d end =%d diff=%d length=%d",start,end ,diff,length);

do i need to do something in kernel file?

Thanks

Pavan

Outcomes