Mark RecursiveFactorization Enzyme tests broken (Enzyme >= 0.13.155 regression)#1032
Conversation
Enzyme v0.13.155 (released 2026-06-10, via EnzymeAD/Enzyme.jl#3154) throws MethodError: no method matching LLVM.ConstantInt(::LLVM.VectorType, ::Int64) in Enzyme.Compiler.abs_typeof (src/absint.jl:857) when compiling the LinearSolve Enzyme derivative rules tests on Julia 1.10, breaking the NoPre (julia lts) CI job. Cap until fixed upstream. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Full regression analysis, in upstream-issue form for whenever this gets filed on EnzymeAD/Enzyme.jl: Title: v0.13.155 regression: Enzyme v0.13.155 (Enzyme_jll 0.0.266+0, released 2026-06-10T04:41:53Z) introduced a regression on Julia 1.10.11 that breaks reverse-mode compilation of LinearSolve.jl's derivative rules. v0.13.154 works. Diffing the Pkg resolution logs of the last passing and first failing CI runs shows Enzyme 0.13.154→0.13.155 / Enzyme_jll 0.0.265→0.0.266 is the only package delta — LLVM.jl (9.8.2) and GPUCompiler (1.20.0) unchanged, ruling LLVM.jl out as the trigger. Root cause: the new GEP stride-analysis block added in EnzymeAD/Enzyme.jl#3154 "Improve type lowering for ptr memcpy" (commit 986746fe, Reproduction (Julia 1.10.11, Enzyme v0.13.155, LLVM.jl 9.8.2, GPUCompiler 1.20.0) — this is using Enzyme, LinearSolve, LinearAlgebra
n = 4
A = rand(n, n); dA = zeros(n, n); b1 = rand(n); db1 = zeros(n)
function f(A, b; alg = LUFactorization())
prob = LinearProblem(A, b)
sol = solve(prob, alg)
norm(sol.u)
end
Enzyme.autodiff(Reverse, f, Duplicated(copy(A), dA), Duplicated(copy(b1), db1))Only the lts (1.10) CI job hits this because LinearSolve gates Enzyme tests to The compat cap in this PR is the repo-side mitigation and should be reverted once an Enzyme release fixes the above. |
This reverts commit ad7e356.
…zyme Enzyme >= 0.13.155 crashes compiling any primal containing VectorizationBase explicit-SIMD gathers (vector GEP -> MethodError: LLVM.ConstantInt(::LLVM.VectorType, ::Int64) in abs_typeof), which hits RecursiveFactorization's TriangularSolve kernels. Upstream issue with an Enzyme-only MWE: EnzymeAD/Enzyme.jl#3164 Only three sites compile RF kernels (verified by per-site probes on Enzyme 0.13.155/0.13.154): the DefaultLinearSolver reverse call (RF loaded makes the default compile the RFLU branch), the explicit RFLUFactorization reverse call, and the Forward-mode RFLU jacobian. These are now @test_broken so they flip to unexpected-pass errors when a fixed Enzyme lands; all other Enzyme tests run as before on latest Enzyme. Full file on 0.13.155/Julia 1.10.11: 40 pass, 3 broken. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
@ChrisRackauckas-Claude this was fixed, can you revert this? |
Please ignore until reviewed by @ChrisRackauckas.
Problem
The
tests / NoPre (julia lts, self-hosted)job fails onmainand all PR branches since ~2026-06-10 05:00 UTC. Culprit: Enzyme v0.13.155 (released 04:41 UTC that day; the only package delta between the last passing and first failing runs). It crashes at compile time —— whenever the primal call graph contains VectorizationBase explicit-SIMD gathers (single-index vector GEPs), even behind custom EnzymeRules. For LinearSolve that means RecursiveFactorization's TriangularSolve kernels. Upstream issue with an Enzyme-only MWE (verified crash on 0.13.155, clean on 0.13.154): EnzymeAD/Enzyme.jl#3164.
Fix (per review: mark broken, don't cap)
The original cap of Enzyme to 0.13.154 is reverted. Instead, the three — and only three — affected call sites in
test/nopre/enzyme.jlare marked@test_broken, each commented with the upstream issue link:DefaultLinearSolverreverse-mode call (with RecursiveFactorization loaded, the default solver compiles the RFLU branch);RFLUFactorizationreverse-mode cache-reuse test (f2);Every other site was probed individually on 0.13.155 (plain
LUFactorizationeven with RF loaded,DefaultLinearSolverwithout RF, cacheinit/solve!paths,KrylovJL_GMRES,BunchKaufman, and all the structured-wrapper testsets) and passes — those keep running on latest Enzyme. When a fixed Enzyme release lands, the@test_brokens flip to unexpected-pass errors, flagging them for removal.Verification
Julia 1.10.11, Enzyme 0.13.155, full
test/nopre/enzyme.jl:(exit 0; on the previous capped approach see the earlier comments — the cap verification also passed, but capping hides the regression instead of tracking it.)
🤖 Generated with Claude Code