Skip to content

Commit

Permalink
Merge pull request #651 from callumfare/callum/cts-fix-kernelsetargpo…
Browse files Browse the repository at this point in the history
…inter

[UR][CTS] Fix urKernelSetArgPointer tests
  • Loading branch information
callumfare committed Jun 27, 2023
2 parents 52d05bf + 95a5fb4 commit df3949e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/conformance/kernel/urKernelSetArgPointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ TEST_P(urKernelSetArgPointerTest, SuccessHost) {
ASSERT_NE(allocation, nullptr);

ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation));
ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data));
ASSERT_SUCCESS(
urKernelSetArgValue(kernel, 1, sizeof(data), nullptr, &data));
Launch1DRange(array_size);
ValidateAllocation(allocation);
}
Expand All @@ -60,7 +61,8 @@ TEST_P(urKernelSetArgPointerTest, SuccessDevice) {
ASSERT_NE(allocation, nullptr);

ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation));
ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data));
ASSERT_SUCCESS(
urKernelSetArgValue(kernel, 1, sizeof(data), nullptr, &data));
Launch1DRange(array_size);

// Copy the device allocation to a host one so we can validate the results.
Expand All @@ -86,7 +88,8 @@ TEST_P(urKernelSetArgPointerTest, SuccessShared) {
ASSERT_NE(allocation, nullptr);

ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &allocation));
ASSERT_SUCCESS(urKernelSetArgValue(kernel, 1, sizeof(data), &data));
ASSERT_SUCCESS(
urKernelSetArgValue(kernel, 1, sizeof(data), nullptr, &data));
Launch1DRange(array_size);
ValidateAllocation(allocation);
}
Expand Down

0 comments on commit df3949e

Please sign in to comment.