diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2015-08-04 13:21:27 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-08-10 12:15:38 +0800 |
commit | 2d2d74a055eebf26a88607704a9b811885131c60 (patch) | |
tree | 553ebfea0a5722f5ab6f7e3aa163fcfa20ec310e /src | |
parent | cc48e2a71abf478813541f33743221db4687c83d (diff) |
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 <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cl_api.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) || |