Skip to content

Commit

Permalink
Merge pull request #331 from hvdijk/urkernelretain
Browse files Browse the repository at this point in the history
urKernelRetain: fix incorrect error result.
  • Loading branch information
hvdijk authored Feb 2, 2024
2 parents 50d00b1 + 4cdc7ea commit b1d1e75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/ur/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ urKernelCreate(ur_program_handle_t hProgram, const char *pKernelName,

UR_APIEXPORT ur_result_t UR_APICALL urKernelRetain(ur_kernel_handle_t hKernel) {
if (!hKernel) {
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
return UR_RESULT_ERROR_INVALID_NULL_HANDLE;
}
return ur::retain(hKernel);
}
Expand Down
2 changes: 2 additions & 0 deletions source/ur/test/source/urKernelRetain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

using urKernelRetainTest = uur::KernelTest;

UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urKernelRetainTest);

TEST_P(urKernelRetainTest, Success) {
ASSERT_SUCCESS(urKernelRetain(kernel));
EXPECT_SUCCESS(urKernelRelease(kernel));
Expand Down

0 comments on commit b1d1e75

Please sign in to comment.