Hey,

So I was trying to get the execution time of the kernel and memory transfers through clGetEvenetProfiingInfo, and it worked fine for the kernel execution time but I am getting strange results while reading/writing data. Any pointers on what is wrong or what should I look into??

This is part of my code ..

=================================
cqCommandQueue = clCreateCommandQueue(cxGPUContext, cdDevice, CL_QUEUE_PROFILING_ENABLE, &ciErr1);
cmDevSrcA = clCreateBuffer(cxGPUContext, CL_MEM_READ_ONLY , sizeof(cl_float) * szGlobalWorkSize, NULL, &ciErr1);
ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, cmDevSrcA, CL_TRUE, 0, sizeof(cl_float) * szGlobalWorkSize, srcA, 0, NULL, &events[0]);

clWaitForEvents(1,&events[0]);
clGetEventProfilingInfo(events[0],CL_PROFILING_COMMAND_START,sizeof(cl_ulong),&star ttime,NULL);
clGetEventProfilingInfo(events[0],CL_PROFILING_COMMAND_END,sizeof(cl_ulong),&endtim e,NULL);
clGetEventProfilingInfo(events[0],CL_PROFILING_COMMAND_QUEUED,sizeof(cl_ulong),&que uetime,NULL);
clGetEventProfilingInfo(event printf("Submit %ld to the kernel\n", ((submittime )));
printf("Queued %f to the kernel\n", (double)((queuetime ))/1000.0);
printf("Write %f to the kernel\n", (double)((endtime -starttime))/1000.0)s[0],CL_PROFILING_COMMAND_SUBMIT,sizeof(cl_ulong),&sub mittime,NULL);

=================================

This is the output

=================================
Submit 0 to the kernel
Queued 1337018677043025.500000 to the kernel
Write 0.000000 to the kernel


=================================

Shoaib