Skip to content

Commit 6e9dbe8

Browse files
committed
More zero size sparse matrix
1 parent 8ce96cc commit 6e9dbe8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/mkl/wrappers_sparse.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
function sparse_release_matrix_handle(A::oneAbstractSparseMatrix)
22
queue = global_queue(context(A.nzVal), device(A.nzVal))
3-
handle_ptr = Ref{matrix_handle_t}(A.handle)
4-
onemklXsparse_release_matrix_handle(sycl_queue(queue), handle_ptr)
3+
m, n = size(A)
4+
if m != 0 && n != 0
5+
handle_ptr = Ref{matrix_handle_t}(A.handle)
6+
onemklXsparse_release_matrix_handle(sycl_queue(queue), handle_ptr)
7+
end
58
end
69

710
for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int32),

0 commit comments

Comments
 (0)