[Beignet] [PATCH v2] GetEventProfilingInfo could query all event status.
xionghu.luo at intel.com
xionghu.luo at intel.com
Mon Aug 3 22:11:10 PDT 2015
From: Luo Xionghu <xionghu.luo at intel.com>
this could fix the shoc project reported CL_PROFILING_INFO_NOT_AVAILABLE
issue.
https://github.com/vetter/shoc/issues/47
v2: per spec, the GetEventProfilingInfo need return
CL_PROFILING_INFO_NOT_AVAILABLE if the event is not CL_COMPLETE, so the
event should be updated in clFinish.
Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
src/cl_command_queue.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
index 4e4ebfb..4b92311 100644
--- a/src/cl_command_queue.c
+++ b/src/cl_command_queue.c
@@ -276,6 +276,9 @@ LOCAL cl_int
cl_command_queue_finish(cl_command_queue queue)
{
cl_gpgpu_sync(cl_get_thread_batch_buf(queue));
+ cl_event last_event = get_last_event(queue);
+ if (last_event)
+ cl_event_update_status(last_event, 1);
return CL_SUCCESS;
}
--
1.9.1
More information about the Beignet
mailing list