File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11function sparse_release_matrix_handle (A:: oneAbstractSparseMatrix )
2- return if A. handle != = nothing
3- queue = global_queue (context (A. nzVal), device (A. nzVal))
4- oneL0. synchronize (queue)
5- handle_ptr = Ref {matrix_handle_t} (A. handle)
6- onemklXsparse_release_matrix_handle (sycl_queue (queue), handle_ptr)
2+ if A. handle != = nothing
3+ try
4+ queue = global_queue (context (A. nzVal), device (A. nzVal))
5+ handle_ptr = Ref {matrix_handle_t} (A. handle)
6+ onemklXsparse_release_matrix_handle (sycl_queue (queue), handle_ptr)
7+ # Only synchronize after successful release to ensure completion
8+ synchronize (queue)
9+ catch err
10+ # Don't let finalizer errors crash the program
11+ @warn " Error releasing sparse matrix handle" exception= err
12+ end
713 end
814end
915
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1919Statistics = " 10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2020Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
2121libigc_jll = " 94295238-5935-5bd7-bb0f-b00942e9bdd5"
22+ oneAPI = " 8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
2223oneAPI_Support_jll = " b049733a-a71d-5ed3-8eba-7d323ac00b36"
You can’t perform that action at this time.
0 commit comments