Skip to content

Commit 8eb929e

Browse files
Fix JET tests: remove broken flag from passing tests
- CholeskyFactorization now passes JET tests - SVDFactorization now passes JET tests - MKLLUFactorization now passes JET tests - KrylovJL_CG, KrylovJL_BICGSTAB, KrylovJL_LSMR, KrylovJL_CRAIGMR now pass - SimpleGMRES now passes JET tests - Skip extension solvers that require packages not loaded in test environment These solvers were marked as broken but actually pass on Julia 1.11.6, causing 'Unexpected Pass' errors in CI. Updated to properly categorize passing vs failing tests.
1 parent 2cd7d52 commit 8eb929e

File tree

3 files changed

+86
-77
lines changed

3 files changed

+86
-77
lines changed

jet_test_output.txt

Whitespace-only changes.

jet_test_results.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Test Summary: | Pass Broken Total Time
2+
JET Tests for Dense Factorizations | 9 4 13 18.3s
3+
JET Tests for Extension Factorizations: Error During Test at /home/crackauc/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:56
4+
Unexpected Pass
5+
Expression: #= /home/crackauc/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:56 =# JET.@test_opt solve(prob, MKLLUFactorization())
6+
Got correct result, please change to @test if no longer broken.
7+
8+
JET Tests for Extension Factorizations: Error During Test at /home/crackauc/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:65
9+
Test threw exception
10+
Expression: #= /home/crackauc/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:65 =# JET.@test_opt solve(prob, CudaOffloadFactorization())
11+
CudaOffloadFactorization requires that CUDA is loaded, i.e. `using CUDA`
12+
Stacktrace:
13+
[1] error(s::String)
14+
@ Base ./error.jl:35
15+
[2] CudaOffloadFactorization
16+
@ ~/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/src/extension_algs.jl:78 [inlined]
17+
[3] macro expansion
18+
@ ~/.julia/packages/JET/yNWjn/src/JETBase.jl:1004 [inlined]
19+
[4] macro expansion
20+
@ ~/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:65 [inlined]
21+
[5] macro expansion
22+
@ ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/Test/src/Test.jl:1709 [inlined]
23+
[6] top-level scope
24+
@ ~/sandbox/tmp_20250809_074544_96568/LinearSolve.jl/test/nopre/jet.jl:48
25+
Test Summary: | Pass Error Broken Total Time
26+
JET Tests for Extension Factorizations | 1 2 3 6 9.9s

test/nopre/jet.jl

Lines changed: 60 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -32,96 +32,79 @@ prob_sparse_spd = LinearProblem(A_sparse_spd, b)
3232
JET.@test_opt solve(prob_spd, NormalCholeskyFactorization())
3333
JET.@test_opt solve(prob, NormalBunchKaufmanFactorization())
3434

35-
# The following tests are currently commented out due to type stability issues:
36-
#
37-
# QRFactorization - runtime dispatch in LinearAlgebra.QRCompactWYQ
38-
# Issue: getproperty(F::QRCompactWY, d::Symbol) has runtime dispatch
39-
# JET.@test_opt solve(prob, QRFactorization())
40-
#
41-
# CholeskyFactorization - type instability
42-
# JET.@test_opt solve(prob_spd, CholeskyFactorization())
43-
#
44-
# LDLtFactorization - type instability
45-
# JET.@test_opt solve(prob_sym, LDLtFactorization())
46-
#
47-
# SVDFactorization - may pass on some Julia versions
48-
# JET.@test_opt solve(prob, SVDFactorization())
49-
#
50-
# BunchKaufmanFactorization - type instability
51-
# JET.@test_opt solve(prob_sym, BunchKaufmanFactorization())
52-
#
53-
# GenericFactorization - runtime dispatch in issuccess
54-
# Issue: _notsuccessful(F::LU) and hasmethod checks cause runtime dispatch
55-
# JET.@test_opt solve(prob, GenericFactorization())
35+
# CholeskyFactorization and SVDFactorization now pass JET tests
36+
JET.@test_opt solve(prob_spd, CholeskyFactorization())
37+
JET.@test_opt solve(prob, SVDFactorization())
38+
39+
# Tests with known type stability issues - marked as broken
40+
JET.@test_opt solve(prob, QRFactorization()) broken=true
41+
JET.@test_opt solve(prob_sym, LDLtFactorization()) broken=true
42+
JET.@test_opt solve(prob_sym, BunchKaufmanFactorization()) broken=true
43+
JET.@test_opt solve(prob, GenericFactorization()) broken=true
5644
end
5745

5846
@testset "JET Tests for Extension Factorizations" begin
5947
# RecursiveFactorization.jl extensions
6048
JET.@test_opt solve(prob, RFLUFactorization())
6149

62-
# The following tests are currently commented out due to type stability issues:
63-
#
64-
# FastLUFactorization - runtime dispatch in do_factorization
65-
# JET.@test_opt solve(prob, FastLUFactorization())
66-
#
67-
# FastQRFactorization - type instability
68-
# JET.@test_opt solve(prob, FastQRFactorization())
69-
#
70-
# Platform-specific factorizations would go here if enabled:
71-
# MKLLUFactorization, AppleAccelerateLUFactorization, etc.
50+
# Tests with known type stability issues
51+
JET.@test_opt solve(prob, FastLUFactorization()) broken=true
52+
JET.@test_opt solve(prob, FastQRFactorization()) broken=true
53+
54+
# Platform-specific factorizations (may not be available on all systems)
55+
if @isdefined(MKLLUFactorization)
56+
# MKLLUFactorization passes JET tests
57+
JET.@test_opt solve(prob, MKLLUFactorization())
58+
end
59+
60+
if Sys.isapple() && @isdefined(AppleAccelerateLUFactorization)
61+
JET.@test_opt solve(prob, AppleAccelerateLUFactorization()) broken=true
62+
end
63+
64+
# CUDA/Metal factorizations (only test if CUDA/Metal are loaded)
65+
# CudaOffloadFactorization requires CUDA to be loaded, skip if not available
66+
if @isdefined(MetalLUFactorization)
67+
JET.@test_opt solve(prob, MetalLUFactorization()) broken=true
68+
end
69+
if @isdefined(BLISLUFactorization)
70+
JET.@test_opt solve(prob, BLISLUFactorization()) broken=true
71+
end
7272
end
7373

7474
@testset "JET Tests for Sparse Factorizations" begin
75-
# All sparse factorizations currently have type stability issues
76-
# These tests are disabled until the issues are resolved:
77-
#
78-
# UMFPACKFactorization - type instability
79-
# JET.@test_opt solve(prob_sparse, UMFPACKFactorization())
80-
#
81-
# KLUFactorization - type instability
82-
# JET.@test_opt solve(prob_sparse, KLUFactorization())
83-
#
84-
# CHOLMODFactorization - type instability
85-
# JET.@test_opt solve(prob_sparse_spd, CHOLMODFactorization())
86-
#
87-
# SparspakFactorization - type instability
88-
# JET.@test_opt solve(prob_sparse, SparspakFactorization())
75+
JET.@test_opt solve(prob_sparse, UMFPACKFactorization()) broken=true
76+
JET.@test_opt solve(prob_sparse, KLUFactorization()) broken=true
77+
JET.@test_opt solve(prob_sparse_spd, CHOLMODFactorization()) broken=true
78+
79+
# SparspakFactorization requires Sparspak to be loaded
80+
# PardisoJL requires Pardiso to be loaded
81+
# CUSOLVERRFFactorization requires CUSOLVERRF to be loaded
82+
# These are tested in their respective extension test suites
8983
end
9084

9185
@testset "JET Tests for Krylov Methods" begin
92-
# All Krylov methods currently have type stability issues
93-
# These tests are disabled until the issues are resolved:
94-
#
95-
# KrylovJL_GMRES - type instability
96-
# JET.@test_opt solve(prob, KrylovJL_GMRES())
97-
#
98-
# KrylovJL_CG - type instability
99-
# JET.@test_opt solve(prob_spd, KrylovJL_CG())
100-
#
101-
# KrylovJL_MINRES - type instability
102-
# JET.@test_opt solve(prob_sym, KrylovJL_MINRES())
103-
#
104-
# KrylovJL_BICGSTAB - type instability
105-
# JET.@test_opt solve(prob, KrylovJL_BICGSTAB())
106-
#
107-
# KrylovJL_LSMR - type instability
108-
# JET.@test_opt solve(prob, KrylovJL_LSMR())
109-
#
110-
# KrylovJL_CRAIGMR - type instability
111-
# JET.@test_opt solve(prob, KrylovJL_CRAIGMR())
112-
#
113-
# KrylovJL_MINARES - type instability
114-
# JET.@test_opt solve(prob_sym, KrylovJL_MINARES())
115-
#
116-
# SimpleGMRES - type instability
117-
# JET.@test_opt solve(prob, SimpleGMRES())
86+
# KrylovJL methods that pass JET tests
87+
JET.@test_opt solve(prob_spd, KrylovJL_CG())
88+
JET.@test_opt solve(prob, KrylovJL_BICGSTAB())
89+
JET.@test_opt solve(prob, KrylovJL_LSMR())
90+
JET.@test_opt solve(prob, KrylovJL_CRAIGMR())
91+
92+
# SimpleGMRES passes JET tests
93+
JET.@test_opt solve(prob, SimpleGMRES())
94+
95+
# KrylovJL methods with known type stability issues
96+
JET.@test_opt solve(prob, KrylovJL_GMRES()) broken=true
97+
JET.@test_opt solve(prob_sym, KrylovJL_MINRES()) broken=true
98+
JET.@test_opt solve(prob_sym, KrylovJL_MINARES()) broken=true
99+
100+
# Extension Krylov methods (require extensions)
101+
# KrylovKitJL_CG, KrylovKitJL_GMRES require KrylovKit to be loaded
102+
# IterativeSolversJL requires IterativeSolvers to be loaded
103+
# These are tested in their respective extension test suites
118104
end
119105

120106
@testset "JET Tests for Default Solver" begin
121-
# Default solver selection has runtime dispatch issues
122-
# These tests are disabled until the issues are resolved:
123-
#
124-
# Default solver - runtime dispatch in solver selection
125-
# JET.@test_opt solve(prob)
126-
# JET.@test_opt solve(prob_sparse)
107+
# Test the default solver selection
108+
JET.@test_opt solve(prob) broken=true
109+
JET.@test_opt solve(prob_sparse) broken=true
127110
end

0 commit comments

Comments
 (0)