cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

arsenm
Adept III

Events ending before they start?

I have a bunch of events which I wait for with clWaitForEvents(). Not always, but quite frequently, the end time for the events is before the start time. Is this perhaps an SDK bug?

A simplified version of what I have is something like this (all functions return without error, i.e CL_SUCCESS)

 

for (i = 0; i < n; ++i) { cl_event event; memset(&event, 0, sizeof(event)); clEnqueueNDRangeKernel(...., &event); clWaitForEvents(1, &event); cl_ulong start, end; clGetEventProfilingInfo(ev, CL_PROFILING_COMMAND_START, sizeof(cl_ulong), &start, NULL); clGetEventProfilingInfo(ev, CL_PROFILING_COMMAND_END, sizeof(cl_ulong), &end, NULL); assert(end >= start); // not always true! clReleaseEvent(event); }

0 Likes
2 Replies
himanshu_gautam
Grandmaster

Can you please provide a testcase to reproduce at our side.

0 Likes

I have a pretty large amount of stuff. I'll try to get something smaller later.

0 Likes