Skip to content

Commit

Permalink
Update tests added since the initial PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongreig committed May 31, 2024
1 parent 1ebdce8 commit 1250460
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/conformance/enqueue/urEnqueueKernelLaunch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ TEST_P(urEnqueueKernelLaunchUSMLinkedList, Success) {
}

// Run kernel which will iterate the list and modify the values
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &list_head));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, list_head));
ASSERT_SUCCESS(urEnqueueKernelLaunch(queue, kernel, 1, &global_offset,
&global_size, nullptr, 0, nullptr,
nullptr));
Expand Down
2 changes: 1 addition & 1 deletion test/conformance/exp_command_buffer/invalid_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct InvalidUpdateTest
std::memset(shared_ptr, 0, allocation_size);

// Index 0 is output
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &shared_ptr));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, shared_ptr));
// Index 1 is input scalar
ASSERT_SUCCESS(
urKernelSetArgValue(kernel, 1, sizeof(val), nullptr, &val));
Expand Down
2 changes: 1 addition & 1 deletion test/conformance/exp_command_buffer/ndrange_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct NDRangeUpdateTest
ASSERT_NE(shared_ptr, nullptr);
std::memset(shared_ptr, 0, allocation_size);

ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &shared_ptr));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, shared_ptr));

// Add a 3 dimension kernel command to command-buffer and close
// command-buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct USMFillCommandTest
std::memset(shared_ptr, 0, allocation_size);

// Index 0 is output
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &shared_ptr));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, shared_ptr));
// Index 1 is input scalar
ASSERT_SUCCESS(
urKernelSetArgValue(kernel, 1, sizeof(val), nullptr, &val));
Expand Down Expand Up @@ -171,7 +171,7 @@ struct USMMultipleFillCommandTest
// kernel output.
void *offset_ptr = (uint32_t *)shared_ptr + (k * elements);
ASSERT_SUCCESS(
urKernelSetArgPointer(kernel, 0, nullptr, &offset_ptr));
urKernelSetArgPointer(kernel, 0, nullptr, offset_ptr));

// Each kernel has a unique fill value
uint32_t fill_val = val + k;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ struct USMSaxpyKernelTest

// Index 0 is output
ASSERT_SUCCESS(
urKernelSetArgPointer(kernel, 0, nullptr, &shared_ptrs[0]));
urKernelSetArgPointer(kernel, 0, nullptr, shared_ptrs[0]));
// Index 1 is A
ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(A), nullptr, &A));
// Index 2 is X
ASSERT_SUCCESS(
urKernelSetArgPointer(kernel, 2, nullptr, &shared_ptrs[1]));
urKernelSetArgPointer(kernel, 2, nullptr, shared_ptrs[1]));
// Index 3 is Y
ASSERT_SUCCESS(
urKernelSetArgPointer(kernel, 3, nullptr, &shared_ptrs[2]));
urKernelSetArgPointer(kernel, 3, nullptr, shared_ptrs[2]));

// Append kernel command to command-buffer and close command-buffer
ASSERT_SUCCESS(urCommandBufferAppendKernelLaunchExp(
Expand Down
2 changes: 1 addition & 1 deletion test/conformance/integration/QueueEmptyStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct QueueEmptyStatusTestWithParam : uur::IntegrationQueueTestWithParam {
ArraySize * sizeof(uint32_t), 0, nullptr, &Event));
ASSERT_NO_FATAL_FAILURE(submitBarrierIfNeeded(Event));

ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &SharedMem));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, SharedMem));

constexpr size_t global_offset = 0;
constexpr size_t n_dimensions = 1;
Expand Down
8 changes: 4 additions & 4 deletions test/conformance/integration/QueueUSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ TEST_P(QueueUSMTestWithParam, QueueUSMTest) {

for (uint32_t i = 0; i < NumIterations; ++i) {
/* Copy from DeviceMem2 to DeviceMem1 and multiply by 2 */
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &DeviceMem1));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 1, nullptr, &DeviceMem2));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, DeviceMem1));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 1, nullptr, DeviceMem2));

ASSERT_SUCCESS(urEnqueueKernelLaunch(Queue, kernel, NDimensions,
&GlobalOffset, &ArraySize, nullptr,
Expand All @@ -99,8 +99,8 @@ TEST_P(QueueUSMTestWithParam, QueueUSMTest) {
CurValueMem2 = CurValueMem1 * 2;

/* Copy from DeviceMem1 to DeviceMem2 and multiply by 2 */
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &DeviceMem2));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 1, nullptr, &DeviceMem1));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, DeviceMem2));
ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 1, nullptr, DeviceMem1));

ASSERT_SUCCESS(urEnqueueKernelLaunch(Queue, kernel, NDimensions,
&GlobalOffset, &ArraySize, nullptr,
Expand Down

0 comments on commit 1250460

Please sign in to comment.