@@ -49,7 +49,15 @@ dual_prob = LinearProblem(A, b)
4949@testset " JET Tests for Dense Factorizations" begin
5050 # Working tests - these pass JET optimization checks
5151 JET. @test_opt init (prob, nothing )
52- JET. @test_opt solve (prob, LUFactorization ())
52+
53+ # LUFactorization has runtime dispatch in Base.CoreLogging on Julia < 1.11
54+ # Fixed in Julia 1.11+
55+ if VERSION < v " 1.11"
56+ JET. @test_opt solve (prob, LUFactorization ()) broken= true
57+ else
58+ JET. @test_opt solve (prob, LUFactorization ())
59+ end
60+
5361 JET. @test_opt solve (prob, GenericLUFactorization ())
5462 JET. @test_opt solve (prob, DiagonalFactorization ())
5563 JET. @test_opt solve (prob, SimpleLUFactorization ())
@@ -60,25 +68,41 @@ dual_prob = LinearProblem(A, b)
6068 # JET.@test_opt solve(prob_spd, CholeskyFactorization())
6169 # JET.@test_opt solve(prob, SVDFactorization())
6270
63- # Tests with known type stability issues - marked as broken
64- JET. @test_opt solve (prob, QRFactorization ()) broken= true
65- JET. @test_opt solve (prob_sym, LDLtFactorization ()) broken= true
66- JET. @test_opt solve (prob_sym, BunchKaufmanFactorization ()) broken= true
71+ # These tests have runtime dispatch issues on Julia < 1.12
72+ # Fixed in Julia nightly/pre-release (1.12+)
73+ if VERSION < v " 1.12.0-"
74+ JET. @test_opt solve (prob, QRFactorization ()) broken= true
75+ JET. @test_opt solve (prob_sym, LDLtFactorization ()) broken= true
76+ JET. @test_opt solve (prob_sym, BunchKaufmanFactorization ()) broken= true
77+ else
78+ JET. @test_opt solve (prob, QRFactorization ())
79+ JET. @test_opt solve (prob_sym, LDLtFactorization ())
80+ JET. @test_opt solve (prob_sym, BunchKaufmanFactorization ())
81+ end
6782 JET. @test_opt solve (prob, GenericFactorization ()) broken= true
6883end
6984
7085@testset " JET Tests for Extension Factorizations" begin
7186 # RecursiveFactorization.jl extensions
7287 # JET.@test_opt solve(prob, RFLUFactorization())
73-
74- # Tests with known type stability issues
75- JET. @test_opt solve (prob, FastLUFactorization ()) broken= true
76- JET. @test_opt solve (prob, FastQRFactorization ()) broken= true
88+
89+ # These tests have runtime dispatch issues on Julia < 1.12
90+ if VERSION < v " 1.12.0-"
91+ JET. @test_opt solve (prob, FastLUFactorization ()) broken= true
92+ JET. @test_opt solve (prob, FastQRFactorization ()) broken= true
93+ else
94+ JET. @test_opt solve (prob, FastLUFactorization ())
95+ JET. @test_opt solve (prob, FastQRFactorization ())
96+ end
7797
7898 # Platform-specific factorizations (may not be available on all systems)
7999 if @isdefined (MKLLUFactorization)
80- # MKLLUFactorization passes JET tests
81- JET. @test_opt solve (prob, MKLLUFactorization ())
100+ # MKLLUFactorization passes on Julia < 1.12 but has runtime dispatch on 1.12+
101+ if VERSION >= v " 1.12.0-"
102+ JET. @test_opt solve (prob, MKLLUFactorization ()) broken= true
103+ else
104+ JET. @test_opt solve (prob, MKLLUFactorization ())
105+ end
82106 end
83107
84108 if Sys. isapple () && @isdefined (AppleAccelerateLUFactorization)
97121end
98122
99123@testset " JET Tests for Sparse Factorizations" begin
100- JET. @test_opt solve (prob_sparse, UMFPACKFactorization ()) broken= true
101- JET. @test_opt solve (prob_sparse, KLUFactorization ()) broken= true
102- JET. @test_opt solve (prob_sparse_spd, CHOLMODFactorization ()) broken= true
103-
124+ # These tests have runtime dispatch issues on Julia < 1.12
125+ if VERSION < v " 1.12.0-"
126+ JET. @test_opt solve (prob_sparse, UMFPACKFactorization ()) broken= true
127+ JET. @test_opt solve (prob_sparse, KLUFactorization ()) broken= true
128+ JET. @test_opt solve (prob_sparse_spd, CHOLMODFactorization ()) broken= true
129+ else
130+ JET. @test_opt solve (prob_sparse, UMFPACKFactorization ())
131+ JET. @test_opt solve (prob_sparse, KLUFactorization ())
132+ JET. @test_opt solve (prob_sparse_spd, CHOLMODFactorization ())
133+ end
134+
104135 # SparspakFactorization requires Sparspak to be loaded
105136 # PardisoJL requires Pardiso to be loaded
106137 # CUSOLVERRFFactorization requires CUSOLVERRF to be loaded
@@ -116,11 +147,17 @@ end
116147
117148 # SimpleGMRES passes JET tests
118149 # JET.@test_opt solve(prob, SimpleGMRES())
119-
120- # KrylovJL methods with known type stability issues
121- JET. @test_opt solve (prob, KrylovJL_GMRES ()) broken= true
122- JET. @test_opt solve (prob_sym, KrylovJL_MINRES ()) broken= true
123- JET. @test_opt solve (prob_sym, KrylovJL_MINARES ()) broken= true
150+
151+ # These tests have Printf runtime dispatch issues in Krylov.jl on Julia < 1.12
152+ if VERSION < v " 1.12.0-"
153+ JET. @test_opt solve (prob, KrylovJL_GMRES ()) broken= true
154+ JET. @test_opt solve (prob_sym, KrylovJL_MINRES ()) broken= true
155+ JET. @test_opt solve (prob_sym, KrylovJL_MINARES ()) broken= true
156+ else
157+ JET. @test_opt solve (prob, KrylovJL_GMRES ())
158+ JET. @test_opt solve (prob_sym, KrylovJL_MINRES ())
159+ JET. @test_opt solve (prob_sym, KrylovJL_MINARES ())
160+ end
124161
125162 # Extension Krylov methods (require extensions)
126163 # KrylovKitJL_CG, KrylovKitJL_GMRES require KrylovKit to be loaded
130167
131168@testset " JET Tests for Default Solver" begin
132169 # Test the default solver selection
133- JET. @test_opt solve (prob) broken= true
134- JET. @test_opt solve (prob_sparse) broken= true
170+ # These tests have runtime dispatch issues on Julia < 1.12
171+ if VERSION < v " 1.12.0-"
172+ JET. @test_opt solve (prob) broken= true
173+ JET. @test_opt solve (prob_sparse) broken= true
174+ else
175+ JET. @test_opt solve (prob)
176+ JET. @test_opt solve (prob_sparse)
177+ end
135178end
136179
137180@testset " JET Tests for creating Dual solutions" begin
0 commit comments