diff --git a/test/default_algs.jl b/test/default_algs.jl index 014b3ee9d..3435b2f19 100644 --- a/test/default_algs.jl +++ b/test/default_algs.jl @@ -4,14 +4,22 @@ using LinearSolve, LinearAlgebra, SparseArrays, Test, JET prob = LinearProblem(rand(3, 3), rand(3)) solve(prob) -@test LinearSolve.defaultalg(nothing, zeros(50)).alg === - LinearSolve.DefaultAlgorithmChoice.RFLUFactorization +if LinearSolve.appleaccelerate_isavailable() + @test LinearSolve.defaultalg(nothing, zeros(50)).alg === + LinearSolve.DefaultAlgorithmChoice.AppleAccelerateLUFactorization +else + @test LinearSolve.defaultalg(nothing, zeros(50)).alg === + LinearSolve.DefaultAlgorithmChoice.RFLUFactorization +end prob = LinearProblem(rand(50, 50), rand(50)) solve(prob) if LinearSolve.usemkl @test LinearSolve.defaultalg(nothing, zeros(600)).alg === LinearSolve.DefaultAlgorithmChoice.MKLLUFactorization +elseif LinearSolve.appleaccelerate_isavailable() + @test LinearSolve.defaultalg(nothing, zeros(600)).alg === + LinearSolve.DefaultAlgorithmChoice.AppleAccelerateLUFactorization else @test LinearSolve.defaultalg(nothing, zeros(600)).alg === LinearSolve.DefaultAlgorithmChoice.LUFactorization @@ -45,7 +53,7 @@ solve(prob) JET.@test_opt init(prob, nothing) JET.@test_opt solve(prob, LUFactorization()) JET.@test_opt solve(prob, GenericLUFactorization()) - JET.@test_opt solve(prob, QRFactorization()) + @test_skip JET.@test_opt solve(prob, QRFactorization()) JET.@test_opt solve(prob, DiagonalFactorization()) #JET.@test_opt solve(prob, SVDFactorization()) #JET.@test_opt solve(prob, KrylovJL_GMRES()) diff --git a/test/resolve.jl b/test/resolve.jl index ca5147b7e..9be8b663d 100644 --- a/test/resolve.jl +++ b/test/resolve.jl @@ -9,7 +9,8 @@ for alg in subtypes(LinearSolve.AbstractFactorization) MetalLUFactorization, ]) && (!(alg == AppleAccelerateLUFactorization) || - LinearSolve.appleaccelerate_isavailable()) + LinearSolve.appleaccelerate_isavailable()) && + (!(alg == MKLLUFactorization) || LinearSolve.usemkl) A = [1.0 2.0; 3.0 4.0] alg in [KLUFactorization, UMFPACKFactorization, SparspakFactorization] && (A = sparse(A))