Skip to content

Commit 8c167bf

Browse files
Add comment before call to unique_ptr::release method
1 parent 08cfede commit 8c167bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dpctl/tensor/libtensor/include/utils/sycl_alloc_utils.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ sycl::event async_smart_free(sycl::queue &exec_q,
206206
}
207207
});
208208
});
209+
210+
// Upon successful submission of host_task, USM allocations are owned
211+
// by the host_task. Release smart pointer ownership to avoid double
212+
// deallocation
209213
(unique_pointers.release(), ...);
210214

211215
return ht_e;

0 commit comments

Comments
 (0)