Skip to content

Commit 46726d0

Browse files
Merge pull request #555 from SciML/default_blas
Guard BLAS defaults more, allowing only Array and BLASFloats
2 parents afc7a12 + 3c4a07b commit 46726d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/default.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool})
179179
__conditioning(assump) === OperatorCondition.WellConditioned)
180180
if length(b) <= 10
181181
DefaultAlgorithmChoice.RFLUFactorization
182-
elseif appleaccelerate_isavailable()
182+
elseif appleaccelerate_isavailable() && b isa Array &&
183+
eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64}
183184
DefaultAlgorithmChoice.AppleAccelerateLUFactorization
184185
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) ||
185186
(usemkl && length(b) <= 200)) &&
@@ -188,7 +189,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool})
188189
DefaultAlgorithmChoice.RFLUFactorization
189190
#elseif A === nothing || A isa Matrix
190191
# alg = FastLUFactorization()
191-
elseif usemkl
192+
elseif usemkl && b isa Array &&
193+
eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64}
192194
DefaultAlgorithmChoice.MKLLUFactorization
193195
else
194196
DefaultAlgorithmChoice.LUFactorization

0 commit comments

Comments
 (0)