diff --git a/include/ur_api.h b/include/ur_api.h index 7b13a1da2c..7459f5f205 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -8910,6 +8910,8 @@ urKernelSuggestMaxCooperativeGroupCountExp( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == phEvent` /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST +/// + `phEventWaitList == NULL && numEventsInWaitList > 0` +/// + `phEventWaitList != NULL && numEventsInWaitList == 0` UR_APIEXPORT ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( ur_queue_handle_t hQueue, ///< [in] handle of the queue object diff --git a/scripts/core/exp-enqueue-timestamp-recording.yml b/scripts/core/exp-enqueue-timestamp-recording.yml index 18316f734e..d8eff2a6cc 100644 --- a/scripts/core/exp-enqueue-timestamp-recording.yml +++ b/scripts/core/exp-enqueue-timestamp-recording.yml @@ -63,4 +63,6 @@ params: returns: - $X_RESULT_ERROR_INVALID_NULL_HANDLE - $X_RESULT_ERROR_INVALID_NULL_POINTER - - $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST + - $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST: + - "`phEventWaitList == NULL && numEventsInWaitList > 0`" + - "`phEventWaitList != NULL && numEventsInWaitList == 0`" diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 82238f4577..d2f63921e2 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -8965,6 +8965,14 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( return UR_RESULT_ERROR_INVALID_NULL_POINTER; } + if (phEventWaitList == NULL && numEventsInWaitList > 0) { + return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST; + } + + if (phEventWaitList != NULL && numEventsInWaitList == 0) { + return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST; + } + if (phEventWaitList != NULL && numEventsInWaitList > 0) { for (uint32_t i = 0; i < numEventsInWaitList; ++i) { if (phEventWaitList[i] == NULL) { diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 590a5230c0..55567f4a7b 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -8324,6 +8324,8 @@ ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == phEvent` /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST +/// + `phEventWaitList == NULL && numEventsInWaitList > 0` +/// + `phEventWaitList != NULL && numEventsInWaitList == 0` ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( ur_queue_handle_t hQueue, ///< [in] handle of the queue object bool diff --git a/source/ur_api.cpp b/source/ur_api.cpp index 809f2ae393..c1aca0d221 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -7043,6 +7043,8 @@ ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == phEvent` /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST +/// + `phEventWaitList == NULL && numEventsInWaitList > 0` +/// + `phEventWaitList != NULL && numEventsInWaitList == 0` ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( ur_queue_handle_t hQueue, ///< [in] handle of the queue object bool