Skip to content

Commit a0a1ba9

Browse files
committed
[UR][L0] Correctly destroy images
`ur_exp_image_mem_native_handle_t` is a `ur_bindless_mem_handle_t *`, but was incorrectly being treated as a `ur_mem_handle_t` on destruction.
1 parent 44ed9b7 commit a0a1ba9

File tree

1 file changed

+3
-2
lines changed
  • unified-runtime/source/adapters/level_zero

1 file changed

+3
-2
lines changed

unified-runtime/source/adapters/level_zero/image.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ ur_result_t
2828
urBindlessImagesImageFreeExp(ur_context_handle_t /*hContext*/,
2929
ur_device_handle_t /*hDevice*/,
3030
ur_exp_image_mem_native_handle_t hImageMem) {
31-
UR_CALL(ur::level_zero::urMemRelease(
32-
reinterpret_cast<ur_mem_handle_t>(hImageMem)));
31+
auto Native = reinterpret_cast<ur_bindless_mem_handle_t *>(hImageMem);
32+
delete Native;
33+
3334
return UR_RESULT_SUCCESS;
3435
}
3536

0 commit comments

Comments
 (0)