From c7dd6f68161aa2a14280e8ff485ae35c1825fc19 Mon Sep 17 00:00:00 2001 From: Jaime Arteaga Date: Sun, 8 May 2022 14:35:03 -0700 Subject: [PATCH] [SYCL][L0] Correctly use global timestamps, instead of context Signed-off-by: Jaime Arteaga --- sycl/plugins/level_zero/pi_level_zero.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index 09de4b0bdaf44..bde8efc6dc89e 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -5331,15 +5331,15 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, case PI_PROFILING_INFO_COMMAND_START: { ZE_CALL(zeEventQueryKernelTimestamp, (Event->ZeEvent, &tsResult)); uint64_t ContextStartTime = - (tsResult.context.kernelStart & TimestampMaxValue) * ZeTimerResolution; + (tsResult.global.kernelStart & TimestampMaxValue) * ZeTimerResolution; return ReturnValue(ContextStartTime); } case PI_PROFILING_INFO_COMMAND_END: { ZE_CALL(zeEventQueryKernelTimestamp, (Event->ZeEvent, &tsResult)); uint64_t ContextStartTime = - (tsResult.context.kernelStart & TimestampMaxValue); - uint64_t ContextEndTime = (tsResult.context.kernelEnd & TimestampMaxValue); + (tsResult.global.kernelStart & TimestampMaxValue); + uint64_t ContextEndTime = (tsResult.global.kernelEnd & TimestampMaxValue); // // Handle a possible wrap-around (the underlying HW counter is < 64-bit).