From 2d2d74a055eebf26a88607704a9b811885131c60 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Tue, 4 Aug 2015 13:21:27 +0800 Subject: runtime: always try to update event status in clGetEventProfilingInfo(). Some applications forgot to call clWaitForEvents() before calling to clGetEventProfilingInfo(). Let's update the event's status here. Signed-off-by: Zhigang Gong Reviewed-by: "Yang, Rong R" --- src/cl_api.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/cl_api.c b/src/cl_api.c index 69eb0bcf..5c9b250c 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -1468,6 +1468,7 @@ clGetEventProfilingInfo(cl_event event, cl_ulong ret_val; CHECK_EVENT(event); + cl_event_update_status(event, 0); if (event->type == CL_COMMAND_USER || !(event->queue->props & CL_QUEUE_PROFILING_ENABLE) || -- cgit v1.2.3