Skip to content

Commit

Permalink
Add conformance test for urEnqueueUSMAdvise for non-coherent memory
Browse files Browse the repository at this point in the history
Test improvement
  • Loading branch information
GeorgeWeb committed Jan 15, 2024
1 parent a864fb2 commit 7fdaed2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/conformance/enqueue/urEnqueueUSMAdvise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,12 @@ TEST_P(urEnqueueUSMAdviseTest, InvalidSizeTooLarge) {
urEnqueueUSMAdvise(queue, ptr, allocation_size * 2,
UR_USM_ADVICE_FLAG_DEFAULT, nullptr));
}

TEST_P(urEnqueueUSMAdviseTest, NonCoherentDeviceMemorySuccessOrWarning) {
ASSERT_EQ_RESULT(static_cast<ur_result_t>(
static_cast<int>(UR_RESULT_SUCCESS) |
static_cast<int>(UR_RESULT_ERROR_ADAPTER_SPECIFIC)),
urEnqueueUSMAdvise(
queue, ptr, allocation_size,
UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY, nullptr));
}

0 comments on commit 7fdaed2

Please sign in to comment.