Skip to content

Commit 662b46b

Browse files
Use sycl_free_noexcept
1 parent 2684651 commit 662b46b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dpctl/tensor/libtensor/include/kernels/sorting/radix_sort.hpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
#include <utility>
3535
#include <vector>
3636

37-
#include "kernels/dpctl_tensor_types.hpp"
3837
#include <sycl/sycl.hpp>
3938

39+
#include "kernels/dpctl_tensor_types.hpp"
40+
#include "utils/sycl_alloc_utils.hpp"
41+
4042
namespace dpctl
4143
{
4244
namespace tensor
@@ -1519,8 +1521,10 @@ sycl::event parallel_radix_sort_impl(sycl::queue &exec_q,
15191521
sort_ev = exec_q.submit([=](sycl::handler &cgh) {
15201522
cgh.depends_on(sort_ev);
15211523
const sycl::context &ctx = exec_q.get_context();
1524+
1525+
using dpctl::tensor::alloc_utils::sycl_free_noexcept;
15221526
cgh.host_task(
1523-
[ctx, count_ptr]() { sycl::free(count_ptr, ctx); });
1527+
[ctx, count_ptr]() { sycl_free_noexcept(count_ptr, ctx); });
15241528
});
15251529

15261530
return sort_ev;
@@ -1572,9 +1576,11 @@ sycl::event parallel_radix_sort_impl(sycl::queue &exec_q,
15721576
cgh.depends_on(sort_ev);
15731577

15741578
const sycl::context &ctx = exec_q.get_context();
1579+
1580+
using dpctl::tensor::alloc_utils::sycl_free_noexcept;
15751581
cgh.host_task([ctx, count_ptr, tmp_arr]() {
1576-
sycl::free(tmp_arr, ctx);
1577-
sycl::free(count_ptr, ctx);
1582+
sycl_free_noexcept(tmp_arr, ctx);
1583+
sycl_free_noexcept(count_ptr, ctx);
15781584
});
15791585
});
15801586
}

0 commit comments

Comments
 (0)