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 1
1
function 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
7
13
end
8
14
end
9
15
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
19
19
Statistics = " 10745b16-79ce-11e8-11f9-7d13ad32a3b2"
20
20
Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
21
21
libigc_jll = " 94295238-5935-5bd7-bb0f-b00942e9bdd5"
22
+ oneAPI = " 8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
22
23
oneAPI_Support_jll = " b049733a-a71d-5ed3-8eba-7d323ac00b36"
You can’t perform that action at this time.
0 commit comments