@@ -214,17 +214,15 @@ nB = 2
214
214
ldiv! (triangle (opa (dA)), dz)
215
215
@test z ≈ collect (dz)
216
216
end
217
- if SparseMatrixType != CuSparseMatrixBSR
217
+ # seems to be a library bug in CUDAs 12.0-12.2, only fp64 types are supported
218
+ if SparseMatrixType != CuSparseMatrixBSR || elty ∈ (Float64, ComplexF64) || CUSPARSE. version () < v " 12.0" || v " 12.2" < CUSPARSE. version ()
218
219
@testset " ldiv! -- (CuVector, CuVector)" begin
219
220
z = rand (elty, m)
220
221
dz = CuArray (z)
221
222
ldiv! (z, triangle (opa (A)), y)
222
223
ldiv! (dz, triangle (opa (dA)), dy)
223
224
@test z ≈ collect (dz)
224
225
end
225
- end
226
- # seems to be a library bug in CUDAs 12.0-12.2, only fp64 types are supported
227
- if SparseMatrixType == CuSparseMatrixBSR || elty ∈ (Float64, ComplexF64) || CUSPARSE. version () < v " 12.0" || v " 12.2" < CUSPARSE. version ()
228
226
@testset " \\ -- CuVector" begin
229
227
x = triangle (opa (A)) \ y
230
228
dx = triangle (opa (dA)) \ dy
@@ -248,7 +246,7 @@ nB = 2
248
246
@test_throws DimensionMismatch (error_str) ldiv! (triangle (opa (dA)), opb (dB_bad))
249
247
end
250
248
end
251
- if SparseMatrixType != CuSparseMatrixBSR
249
+ if SparseMatrixType != CuSparseMatrixBSR || elty ∈ (Float64, ComplexF64) || CUSPARSE . version () != v " 12.0 "
252
250
@testset " ldiv! -- (CuMatrix, CuMatrix)" begin
253
251
C = rand (elty, m, nB)
254
252
dC = CuArray (C)
@@ -259,13 +257,13 @@ nB = 2
259
257
@test_throws DimensionMismatch (error_str) ldiv! (triangle (opa (dA)), opb (dB_bad))
260
258
end
261
259
end
262
- end
263
- @testset " \\ -- CuMatrix " begin
264
- C = triangle (opa (A )) \ opb (B )
265
- dC = triangle ( opa (dA)) \ opb (dB )
266
- @test C ≈ collect (dC)
267
- if CUSPARSE . version () < v " 12.0 "
268
- @test_throws DimensionMismatch (error_str) ldiv! ( triangle ( opa (dA)), opb (dB_bad))
260
+ @testset " \\ -- CuMatrix " begin
261
+ C = triangle ( opa (A)) \ opb (B)
262
+ dC = triangle (opa (dA )) \ opb (dB )
263
+ @test C ≈ collect (dC )
264
+ if CUSPARSE . version () < v " 12.0 "
265
+ @test_throws DimensionMismatch (error_str) ldiv! ( triangle ( opa (dA)), opb (dB_bad))
266
+ end
269
267
end
270
268
end
271
269
end
0 commit comments