Skip to content

Commit d5d5e62

Browse files
Ensure that BLAS is only called with BLAS element types
1 parent d914caa commit d5d5e62

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/default.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function defaultalg(A, b, assump::OperatorAssumptions)
156156
# whether MKL or OpenBLAS is being used
157157
if (A === nothing && !(b isa GPUArraysCore.AbstractGPUArray)) || A isa Matrix
158158
if (A === nothing ||
159-
eltype(A) <: Union{Float32, Float64, ComplexF32, ComplexF64}) &&
159+
eltype(A) <: BLASELTYPES) &&
160160
ArrayInterface.can_setindex(b) &&
161161
(__conditioning(assump) === OperatorCondition.IllConditioned ||
162162
__conditioning(assump) === OperatorCondition.WellConditioned)
@@ -180,7 +180,8 @@ function defaultalg(A, b, assump::OperatorAssumptions)
180180
DefaultAlgorithmChoice.QRFactorization
181181
elseif __conditioning(assump) === OperatorCondition.SuperIllConditioned
182182
DefaultAlgorithmChoice.SVDFactorization
183-
elseif usemkl
183+
elseif usemkl && (A === nothing ? eltype(b) <: BLASELTYPES :
184+
eltype(A) <: BLASELTYPES)
184185
DefaultAlgorithmChoice.MKLLUFactorization
185186
else
186187
DefaultAlgorithmChoice.LUFactorization

0 commit comments

Comments
 (0)