Skip to content

Commit 719bb9c

Browse files
authored
Merge pull request #1619 from npmiller/fix-timestamp-val
Fix validation for urEnqueueTimestampRecordingExpTest
2 parents 2d71c76 + 75476b5 commit 719bb9c

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

include/ur_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8910,6 +8910,8 @@ urKernelSuggestMaxCooperativeGroupCountExp(
89108910
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
89118911
/// + `NULL == phEvent`
89128912
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
8913+
/// + `phEventWaitList == NULL && numEventsInWaitList > 0`
8914+
/// + `phEventWaitList != NULL && numEventsInWaitList == 0`
89138915
UR_APIEXPORT ur_result_t UR_APICALL
89148916
urEnqueueTimestampRecordingExp(
89158917
ur_queue_handle_t hQueue, ///< [in] handle of the queue object

scripts/core/exp-enqueue-timestamp-recording.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ params:
6363
returns:
6464
- $X_RESULT_ERROR_INVALID_NULL_HANDLE
6565
- $X_RESULT_ERROR_INVALID_NULL_POINTER
66-
- $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
66+
- $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST:
67+
- "`phEventWaitList == NULL && numEventsInWaitList > 0`"
68+
- "`phEventWaitList != NULL && numEventsInWaitList == 0`"

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8965,6 +8965,14 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueTimestampRecordingExp(
89658965
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
89668966
}
89678967

8968+
if (phEventWaitList == NULL && numEventsInWaitList > 0) {
8969+
return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST;
8970+
}
8971+
8972+
if (phEventWaitList != NULL && numEventsInWaitList == 0) {
8973+
return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST;
8974+
}
8975+
89688976
if (phEventWaitList != NULL && numEventsInWaitList > 0) {
89698977
for (uint32_t i = 0; i < numEventsInWaitList; ++i) {
89708978
if (phEventWaitList[i] == NULL) {

source/loader/ur_libapi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8324,6 +8324,8 @@ ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
83248324
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
83258325
/// + `NULL == phEvent`
83268326
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
8327+
/// + `phEventWaitList == NULL && numEventsInWaitList > 0`
8328+
/// + `phEventWaitList != NULL && numEventsInWaitList == 0`
83278329
ur_result_t UR_APICALL urEnqueueTimestampRecordingExp(
83288330
ur_queue_handle_t hQueue, ///< [in] handle of the queue object
83298331
bool

source/ur_api.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7043,6 +7043,8 @@ ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp(
70437043
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
70447044
/// + `NULL == phEvent`
70457045
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
7046+
/// + `phEventWaitList == NULL && numEventsInWaitList > 0`
7047+
/// + `phEventWaitList != NULL && numEventsInWaitList == 0`
70467048
ur_result_t UR_APICALL urEnqueueTimestampRecordingExp(
70477049
ur_queue_handle_t hQueue, ///< [in] handle of the queue object
70487050
bool

0 commit comments

Comments
 (0)