|
1 |
| -using LinearSolve, RecursiveFactorization, LinearAlgebra, SparseArrays, Test, JET |
| 1 | +using LinearSolve, RecursiveFactorization, LinearAlgebra, SparseArrays, Test |
| 2 | + |
| 3 | +if isempty(VERSION.prerelease) |
| 4 | + using JET |
| 5 | +end |
| 6 | + |
2 | 7 | @test LinearSolve.defaultalg(nothing, zeros(3)).alg ===
|
3 | 8 | LinearSolve.DefaultAlgorithmChoice.GenericLUFactorization
|
4 | 9 | prob = LinearProblem(rand(3, 3), rand(3))
|
@@ -55,19 +60,23 @@ solve(prob)
|
55 | 60 | A = rand(4, 4)
|
56 | 61 | b = rand(4)
|
57 | 62 | prob = LinearProblem(A, b)
|
58 |
| -VERSION ≥ v"1.10-" && JET.@test_opt init(prob, nothing) |
59 |
| -JET.@test_opt solve(prob, LUFactorization()) |
60 |
| -JET.@test_opt solve(prob, GenericLUFactorization()) |
61 |
| -@test_skip JET.@test_opt solve(prob, QRFactorization()) |
62 |
| -JET.@test_opt solve(prob, DiagonalFactorization()) |
63 |
| -#JET.@test_opt solve(prob, SVDFactorization()) |
64 |
| -#JET.@test_opt solve(prob, KrylovJL_GMRES()) |
| 63 | +if if isempty(VERSION.prerelease) |
| 64 | + JET.@test_opt init(prob, nothing) |
| 65 | + JET.@test_opt solve(prob, LUFactorization()) |
| 66 | + JET.@test_opt solve(prob, GenericLUFactorization()) |
| 67 | + @test_skip JET.@test_opt solve(prob, QRFactorization()) |
| 68 | + JET.@test_opt solve(prob, DiagonalFactorization()) |
| 69 | + #JET.@test_opt solve(prob, SVDFactorization()) |
| 70 | + #JET.@test_opt solve(prob, KrylovJL_GMRES()) |
| 71 | + |
| 72 | + prob = LinearProblem(sparse(A), b) |
| 73 | + #JET.@test_opt solve(prob, UMFPACKFactorization()) |
| 74 | + #JET.@test_opt solve(prob, KLUFactorization()) |
| 75 | + #JET.@test_opt solve(prob, SparspakFactorization()) |
| 76 | + #JET.@test_opt solve(prob) |
| 77 | +end |
65 | 78 |
|
66 | 79 | prob = LinearProblem(sparse(A), b)
|
67 |
| -#JET.@test_opt solve(prob, UMFPACKFactorization()) |
68 |
| -#JET.@test_opt solve(prob, KLUFactorization()) |
69 |
| -#JET.@test_opt solve(prob, SparspakFactorization()) |
70 |
| -#JET.@test_opt solve(prob) |
71 | 80 | @inferred solve(prob)
|
72 | 81 | @inferred init(prob, nothing)
|
73 | 82 |
|
|
0 commit comments