From 2118a7a094822b840049e15abf638cb0862dec13 Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Fri, 22 Aug 2025 13:50:49 +0100 Subject: [PATCH] [UR][Offload] `UR_EVENT_INFO_COMMAND_EXECUTION_STATUS` --- unified-runtime/source/adapters/offload/event.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/unified-runtime/source/adapters/offload/event.cpp b/unified-runtime/source/adapters/offload/event.cpp index 98b48790b0055..f217fd5321034 100644 --- a/unified-runtime/source/adapters/offload/event.cpp +++ b/unified-runtime/source/adapters/offload/event.cpp @@ -31,6 +31,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo(ur_event_handle_t hEvent, return ReturnValue(hEvent->Type); case UR_EVENT_INFO_REFERENCE_COUNT: return ReturnValue(hEvent->RefCount.load()); + case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: { + bool Complete; + OL_RETURN_ON_ERR(olGetEventInfo(hEvent->OffloadEvent, + OL_EVENT_INFO_IS_COMPLETE, sizeof(Complete), + &Complete)); + if (Complete) { + return ReturnValue(UR_EVENT_STATUS_COMPLETE); + } else { + return ReturnValue(UR_EVENT_STATUS_QUEUED); + } + } default: return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; }