From 3c4a07b680cf477b68a57e4326ba446aa70dd522 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 30 Oct 2024 22:37:07 -0100 Subject: [PATCH] Guard BLAS defaults more, allowing only Array and BLASFloats Fixes https://github.com/SciML/JumpProcesses.jl/issues/459 --- src/default.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/default.jl b/src/default.jl index 4621edcff..525c5360f 100644 --- a/src/default.jl +++ b/src/default.jl @@ -179,7 +179,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool}) __conditioning(assump) === OperatorCondition.WellConditioned) if length(b) <= 10 DefaultAlgorithmChoice.RFLUFactorization - elseif appleaccelerate_isavailable() + elseif appleaccelerate_isavailable() && b isa Array && + eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64} DefaultAlgorithmChoice.AppleAccelerateLUFactorization elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) || (usemkl && length(b) <= 200)) && @@ -188,7 +189,8 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool}) DefaultAlgorithmChoice.RFLUFactorization #elseif A === nothing || A isa Matrix # alg = FastLUFactorization() - elseif usemkl + elseif usemkl && b isa Array && + eltype(b) <: Union{Float32, Float64, ComplexF32, ComplexF64} DefaultAlgorithmChoice.MKLLUFactorization else DefaultAlgorithmChoice.LUFactorization