|
35 | 35 | #include "kernels/dpctl_tensor_types.hpp" |
36 | 36 | #include "kernels/reductions.hpp" |
37 | 37 | #include "utils/offset_utils.hpp" |
| 38 | +#include "utils/sycl_alloc_utils.hpp" |
38 | 39 | #include "utils/sycl_utils.hpp" |
39 | 40 | #include "utils/type_utils.hpp" |
40 | 41 |
|
@@ -2364,7 +2365,8 @@ gemm_batch_tree_k_impl(sycl::queue &exec_q, |
2364 | 2365 | cgh.depends_on(red_ev); |
2365 | 2366 | const sycl::context &ctx = exec_q.get_context(); |
2366 | 2367 |
|
2367 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 2368 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 2369 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
2368 | 2370 | }); |
2369 | 2371 | return cleanup_host_task_event; |
2370 | 2372 | } |
@@ -2427,8 +2429,9 @@ gemm_batch_tree_k_impl(sycl::queue &exec_q, |
2427 | 2429 | cgh.depends_on(red_ev); |
2428 | 2430 | const sycl::context &ctx = exec_q.get_context(); |
2429 | 2431 |
|
| 2432 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
2430 | 2433 | cgh.host_task([ctx, partially_reduced_tmp] { |
2431 | | - sycl::free(partially_reduced_tmp, ctx); |
| 2434 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
2432 | 2435 | }); |
2433 | 2436 | }); |
2434 | 2437 |
|
@@ -2661,7 +2664,8 @@ gemm_batch_tree_nm_impl(sycl::queue &exec_q, |
2661 | 2664 | cgh.depends_on(red_ev); |
2662 | 2665 | const sycl::context &ctx = exec_q.get_context(); |
2663 | 2666 |
|
2664 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 2667 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 2668 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
2665 | 2669 | }); |
2666 | 2670 | return cleanup_host_task_event; |
2667 | 2671 | } |
@@ -2728,8 +2732,9 @@ gemm_batch_tree_nm_impl(sycl::queue &exec_q, |
2728 | 2732 | cgh.depends_on(red_ev); |
2729 | 2733 | const sycl::context &ctx = exec_q.get_context(); |
2730 | 2734 |
|
| 2735 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
2731 | 2736 | cgh.host_task([ctx, partially_reduced_tmp] { |
2732 | | - sycl::free(partially_reduced_tmp, ctx); |
| 2737 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
2733 | 2738 | }); |
2734 | 2739 | }); |
2735 | 2740 |
|
@@ -3038,7 +3043,8 @@ gemm_batch_contig_tree_k_impl(sycl::queue &exec_q, |
3038 | 3043 | cgh.depends_on(red_ev); |
3039 | 3044 | const sycl::context &ctx = exec_q.get_context(); |
3040 | 3045 |
|
3041 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 3046 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 3047 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
3042 | 3048 | }); |
3043 | 3049 | return cleanup_host_task_event; |
3044 | 3050 | } |
@@ -3097,8 +3103,9 @@ gemm_batch_contig_tree_k_impl(sycl::queue &exec_q, |
3097 | 3103 | cgh.depends_on(red_ev); |
3098 | 3104 | const sycl::context &ctx = exec_q.get_context(); |
3099 | 3105 |
|
| 3106 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
3100 | 3107 | cgh.host_task([ctx, partially_reduced_tmp] { |
3101 | | - sycl::free(partially_reduced_tmp, ctx); |
| 3108 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
3102 | 3109 | }); |
3103 | 3110 | }); |
3104 | 3111 |
|
@@ -3238,7 +3245,8 @@ gemm_batch_contig_tree_nm_impl(sycl::queue &exec_q, |
3238 | 3245 | cgh.depends_on(red_ev); |
3239 | 3246 | const sycl::context &ctx = exec_q.get_context(); |
3240 | 3247 |
|
3241 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 3248 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 3249 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
3242 | 3250 | }); |
3243 | 3251 | return cleanup_host_task_event; |
3244 | 3252 | } |
@@ -3299,8 +3307,9 @@ gemm_batch_contig_tree_nm_impl(sycl::queue &exec_q, |
3299 | 3307 | cgh.depends_on(red_ev); |
3300 | 3308 | const sycl::context &ctx = exec_q.get_context(); |
3301 | 3309 |
|
| 3310 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
3302 | 3311 | cgh.host_task([ctx, partially_reduced_tmp] { |
3303 | | - sycl::free(partially_reduced_tmp, ctx); |
| 3312 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
3304 | 3313 | }); |
3305 | 3314 | }); |
3306 | 3315 |
|
@@ -3603,7 +3612,8 @@ sycl::event gemm_tree_k_impl(sycl::queue &exec_q, |
3603 | 3612 | cgh.depends_on(red_ev); |
3604 | 3613 | const sycl::context &ctx = exec_q.get_context(); |
3605 | 3614 |
|
3606 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 3615 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 3616 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
3607 | 3617 | }); |
3608 | 3618 | return cleanup_host_task_event; |
3609 | 3619 | } |
@@ -3646,8 +3656,9 @@ sycl::event gemm_tree_k_impl(sycl::queue &exec_q, |
3646 | 3656 | cgh.depends_on(red_ev); |
3647 | 3657 | const sycl::context &ctx = exec_q.get_context(); |
3648 | 3658 |
|
| 3659 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
3649 | 3660 | cgh.host_task([ctx, partially_reduced_tmp] { |
3650 | | - sycl::free(partially_reduced_tmp, ctx); |
| 3661 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
3651 | 3662 | }); |
3652 | 3663 | }); |
3653 | 3664 |
|
@@ -3769,7 +3780,8 @@ sycl::event gemm_tree_nm_impl(sycl::queue &exec_q, |
3769 | 3780 | cgh.depends_on(red_ev); |
3770 | 3781 | const sycl::context &ctx = exec_q.get_context(); |
3771 | 3782 |
|
3772 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 3783 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 3784 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
3773 | 3785 | }); |
3774 | 3786 | return cleanup_host_task_event; |
3775 | 3787 | } |
@@ -3812,8 +3824,9 @@ sycl::event gemm_tree_nm_impl(sycl::queue &exec_q, |
3812 | 3824 | cgh.depends_on(red_ev); |
3813 | 3825 | const sycl::context &ctx = exec_q.get_context(); |
3814 | 3826 |
|
| 3827 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
3815 | 3828 | cgh.host_task([ctx, partially_reduced_tmp] { |
3816 | | - sycl::free(partially_reduced_tmp, ctx); |
| 3829 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
3817 | 3830 | }); |
3818 | 3831 | }); |
3819 | 3832 |
|
@@ -4016,7 +4029,8 @@ sycl::event gemm_contig_tree_k_impl(sycl::queue &exec_q, |
4016 | 4029 | cgh.depends_on(red_ev); |
4017 | 4030 | const sycl::context &ctx = exec_q.get_context(); |
4018 | 4031 |
|
4019 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 4032 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 4033 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
4020 | 4034 | }); |
4021 | 4035 | return cleanup_host_task_event; |
4022 | 4036 | } |
@@ -4058,8 +4072,9 @@ sycl::event gemm_contig_tree_k_impl(sycl::queue &exec_q, |
4058 | 4072 | cgh.depends_on(red_ev); |
4059 | 4073 | const sycl::context &ctx = exec_q.get_context(); |
4060 | 4074 |
|
| 4075 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
4061 | 4076 | cgh.host_task([ctx, partially_reduced_tmp] { |
4062 | | - sycl::free(partially_reduced_tmp, ctx); |
| 4077 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
4063 | 4078 | }); |
4064 | 4079 | }); |
4065 | 4080 |
|
@@ -4170,7 +4185,8 @@ sycl::event gemm_contig_tree_nm_impl(sycl::queue &exec_q, |
4170 | 4185 | cgh.depends_on(red_ev); |
4171 | 4186 | const sycl::context &ctx = exec_q.get_context(); |
4172 | 4187 |
|
4173 | | - cgh.host_task([ctx, tmp] { sycl::free(tmp, ctx); }); |
| 4188 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
| 4189 | + cgh.host_task([ctx, tmp] { sycl_free_noexcept(tmp, ctx); }); |
4174 | 4190 | }); |
4175 | 4191 | return cleanup_host_task_event; |
4176 | 4192 | } |
@@ -4211,8 +4227,9 @@ sycl::event gemm_contig_tree_nm_impl(sycl::queue &exec_q, |
4211 | 4227 | cgh.depends_on(red_ev); |
4212 | 4228 | const sycl::context &ctx = exec_q.get_context(); |
4213 | 4229 |
|
| 4230 | + using dpctl::tensor::alloc_utils::sycl_free_noexcept; |
4214 | 4231 | cgh.host_task([ctx, partially_reduced_tmp] { |
4215 | | - sycl::free(partially_reduced_tmp, ctx); |
| 4232 | + sycl_free_noexcept(partially_reduced_tmp, ctx); |
4216 | 4233 | }); |
4217 | 4234 | }); |
4218 | 4235 |
|
|
0 commit comments