Skip to content

Commit c86d2fc

Browse files
committed
remove reference count checks from kernel retain and release
1 parent f61e182 commit c86d2fc

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

unified-runtime/source/adapters/opencl/kernel.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,12 @@ urKernelGetSubGroupInfo(ur_kernel_handle_t hKernel, ur_device_handle_t hDevice,
336336
}
337337

338338
UR_APIEXPORT ur_result_t UR_APICALL urKernelRetain(ur_kernel_handle_t hKernel) {
339-
340-
UR_ASSERT(hKernel->getReferenceCount() > 0u, UR_RESULT_ERROR_INVALID_KERNEL);
341-
342339
hKernel->incrementReferenceCount();
343340
return UR_RESULT_SUCCESS;
344341
}
345342

346343
UR_APIEXPORT ur_result_t UR_APICALL
347344
urKernelRelease(ur_kernel_handle_t hKernel) {
348-
349-
UR_ASSERT(hKernel->getReferenceCount() != 0, UR_RESULT_ERROR_INVALID_KERNEL);
350-
351345
if (hKernel->decrementReferenceCount() == 0) {
352346
delete hKernel;
353347
}

0 commit comments

Comments
 (0)