Repository navigation
Enzyme Julia 1 job aborts in IIP wrapper mutated-after-call regression #67
Description
Activity
ChrisRackauckas-Claude commented
on Jul 11, 2026 MemberAuthorMore actionsFresh local check while auditing PR #68:
9c11a85(v1.9.2) passestimeout 3600 ~/.juliaup/bin/julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test(; test_args=["Enzyme"])'with Enzyme group65 pass.\n-103e9fb(Split reverse-mode thunk for the IIP FWW Enzyme rule) fails the same command with signal 6 / EnzymeGradientUtils.cpp:656assertion attest/Enzyme/enzyme_tests.jl:349.\n-8eacfeealso fails with the same assertion.\n\nSo PR Use SciMLTesting public API docs QA #68 is not introducing this; it is a pre-existingmainblocker tracked here.
ChrisRackauckas-Claude commented
on Jul 12, 2026 MemberAuthorMore actionsAdditional local triage from a clean
origin/maincheckout (fd02a35, branchagent/enzyme-main-failure), using the requested command form:timeout 3600 env GROUP=Enzyme ~/.juliaup/bin/julia +release --project=. -e 'using Pkg; Pkg.test()'
Result: reproduced the same signal-6 abort at
test/Enzyme/enzyme_tests.jl:349with Julia1.12.5,Enzyme v0.13.181,EnzymeCore v0.8.21,Enzyme_jll v0.0.281+0,LLVM v9.10.0, andGPUCompiler v1.23.0.Dependency / version boundary checks on the minimal
args mutated after callscenario:- Julia
1.11.9passes with the sameEnzyme v0.13.181/Enzyme_jll v0.0.281+0stack and returnsg = [3.1499999999999995, 12.8], matching[4.5p1, 32p2]. - Julia
1.12.0fails with the sameGradientUtils.cpp:656assertion and the same Enzyme stack. - Julia
1.12.5also fails; pinningEnzyme v0.13.180/Enzyme_jll v0.0.280+0still fails, so this is not just the latest Enzyme release. - The same loss written without
FunctionWrappersWrapperpasses on Julia1.12.5withEnzyme v0.13.181.
I also injected the minimal scenario into
77e373f(v1.9.3, before103e9fb) under Julia1.12.5/ Enzyme0.13.181, and it aborts the same way. So103e9fbappears to be the first commit that adds suite coverage for this path, not necessarily the root cause of the compiler abort.Attempted local workaround: adding Enzyme rules for raw
FunctionWrappers.FunctionWrapperanalogous to the existingFunctionWrappersWrapperrules did not change the failure; Enzyme still reachedjlcapi_CallWrapperIR and aborted. I reverted that experiment locally.Current best culprit: Julia 1.12 changes expose an Enzyme failure on the FunctionWrappers call ABI (
jlcapi_CallWrapper) used by this wrapped IIP reverse-mode path. A repo-local fix was not identified in this pass.- Julia
ChrisRackauckas-Claude commented
on Jul 15, 2026 MemberAuthorMore actionsFormal follow-up from the CI investigation:
- With Julia 1.12.6 and Enzyme 0.13.183, a source-history bisect identifies
103e9fb692536f06ee10838b712596ad76dac284(the split reverse-mode thunk change) as the first FunctionWrappersWrappers commit that exercises the aborting path. - Its immediate parent
66c60cfd6d95906c7e3297d7aa5896c99dccb750passes the complete Enzyme test file under the same pinned environment. - Current
mainaborts with Enzyme 0.13.183 and 0.13.184, while Enzyme 0.13.185 passes the full Enzyme group (68/68).
Draft PR #71 raises both package and test-environment compatibility floors to Enzyme 0.13.185 without changing the regression test.
- With Julia 1.12.6 and Enzyme 0.13.183, a source-history bisect identifies
Failure
The
tests / Enzyme (julia 1, ubuntu-latest)CI job aborts with signal 6 in the regression test attest/Enzyme/enzyme_tests.jl:349.The assertion is from Enzyme:
Reproduction
On current
main(8eacfee9a798ff9b62579a71a1d0a67a2ac0a8a6):timeout 3600 /home/crackauc/.juliaup/bin/julia +1.12 --project=test/Enzyme -e 'using Pkg; Pkg.instantiate(); include("test/Enzyme/enzyme_tests.jl")'Observed locally: exit code
134, same Enzyme assertion, sameenzyme_tests.jl:349location.CI Evidence
mainalready had the same failure five days earlier: https://github.com/SciML/FunctionWrappersWrappers.jl/actions/runs/28746567184/job/85238389000The earlier
mainlog reports the same assertion atGradientUtils.cpp:652, signal 6, andtest/Enzyme/enzyme_tests.jl:349.Bisect / Origin Note
The failing regression test block was introduced by
103e9fb6(Split reverse-mode thunk for the IIP FWW Enzyme rule). The current failure appears to be specific to the Julia 1.x Enzyme lane; the lts Enzyme lane passed in PR #66 and the local Julia 1.10Pkg.test()run passed all groups.