Hi,
I create an read_write buffer on device. After computing the CL kernel I'm ready to read is back to the host, but it appears an CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error. The documents online says:
if the read and write operations are blocking and the execution status of any of the events in event_wait_list is a negative integer value.
event_wait_list
But the event_wait_list I pass into is null and the number of event is zero. This help nothing. It runs no error in any other gpu but mali (mali-T760). What the reason cause this?
Best wishes,
phenix
Thanks very much.
I rewrite the code as your recommendation:
cl_event event;
cl_int status;
ret = clEnqueueNDRangeKernel(pGpuMgr->cmdQueue[0],
pNLFlt->CLKernelFNL[i].kernel,
2,MNull,
pNLFlt->CLKernelFNL[i].globalSize,
pNLFlt->CLKernelFNL[i].localSize,0,MNull,&event);
if (ret != CL_SUCCESS)
{
mlog("ERROR: parameters are invalid CLKernelFNL[%d] \n",i);
ss_gpuOCLErrCode(ret);
return;
}
ret = clWaitForEvents(1,&event);
if(ret != CL_SUCCESS){
mlog("ERROR: Failed to wait for event.\n");
ret = clGetEventInfo(event,CL_EVENT_COMMAND_EXECUTION_STATUS,sizeof(status),&status,NULL);
mlog("ERROR: Failed to get event info.\n");
if(status != CL_COMPLETE){
printf("ERROR executing the kernel %d\n",status);
and find that the error occur again after call clWaitForEvents(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST). Can it be sure that it's caused by the kernel?
My bad, this is normal, you don't actually need to use clGetEventInfo
According to the specs for clWaitForEvents:
CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of any of the events in event_list is a negative integer value.
event_list
You would only need to use clGetEventInfo to find out which event failed in the case where you have several events in the queue.
I'm going to edit my previous reply to reflect that.