Skip to content

Downgrade CI: split Core, AD and Enzyme into separate jobs - #83

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas:green/FastPower.jl
Oct 16, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas:green/FastPower.jl

Conversation

@ChrisRackauckas

@ChrisRackauckas ChrisRackauckas commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Devin CLI 3000.11.92 (diagnosis and fix), Claude Code 2.1.300 (PR) · Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq (fleet master)

This fixes a failure on the default branch's CI. The diagnosis and the evidence below come from the investigating agent's report; "confirmed by running" and "read in logs" are kept apart there.

Downgrade Tests (lts): UndefVarError: IRBuilder not defined in GPUCompiler 2.10.0, so Enzyme fails to precompile

Error

Seen in the Downgrade job on Julia 1.10, while the Enzyme/enzyme_forward_tests.jl test set runs:

ERROR: LoadError: UndefVarError: `IRBuilder` not defined
   @ ~/.julia/packages/GPUCompiler/Mkgjq/src/interface.jl:348
ERROR: LoadError: Failed to precompile GPUCompiler [61eb1bfa-7361-4325-ad38-22787b887f55] ...
  LoadError: Failed to precompile Enzyme [7da242da-08ed-463a-9acd-ee780be4f1d9] ...
Enzyme/enzyme_forward_tests.jl |     1      1
Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

Both runs below fail the same way. In both, the AD env resolves LLVM v10.2.1 and UnsafeAtomics v0.4.0, and the Enzyme env resolves Enzyme v0.13.216, GPUCompiler v2.10.0 and LLVM v9.13.2.

In that green run the AD env did not contain LLVM.jl at all (UnsafeAtomics was v0.3.2), and the Enzyme env had Enzyme 0.13.204, GPUCompiler 1.23.0 and LLVM 9.13.1.

Cause

The trigger is an upstream dependency release. What makes it fatal is how this repo's Downgrade lane is structured.

  • This repo's Downgrade lane runs every group in one process. .github/workflows/Downgrade.yml calls the shared SciML downgrade workflow without a group, so GROUP is empty and SciMLTesting runs "All". That means Core, then test/AD, then test/Enzyme, all in one Julia process. Each group with its own Project.toml is resolved separately but activated in that same process, so a package loaded by an earlier group stays loaded for later ones. Tests.yml runs AD and Enzyme as separate jobs and is green, including on Julia lts.
  • The dependency change: UnsafeAtomics.jl v0.4.0 (released 2026-10-05) makes LLVM.jl 10 a hard dependency. In 0.3.0–0.3.2 it was an optional dependency capped at LLVM 9. Atomix 1.3+ (released 2026-10-05/06) allows UnsafeAtomics 0.4. The AD env reaches it through Tracker → NNlib → Atomix 1.6.0 → UnsafeAtomics 0.4.0, so using Tracker now loads LLVM.jl 10.2.1.
  • Enzyme cannot use LLVM.jl 10 yet. Every registered Enzyme release, including the latest 0.13.216, requires LLVM.jl 9 (registry compat "0.13.167 - 0" => LLVM = "9.10.0 - 9"). So the Enzyme env gets GPUCompiler 2.10.0, the last GPUCompiler that works with LLVM 9 (2.11+ requires LLVM 10).
  • How it breaks: when the Enzyme group runs using Enzyme, LLVM 10.2.1 is already loaded. Julia therefore rebuilds the GPUCompiler 2.10.0 cache against the LLVM that is already in memory. LLVM.jl 10 no longer has IRBuilder, so loading fails. The log also says "dependencies precompiled but different versions are currently loaded".

Nothing in FastPower changed. PR #82 only touched the QA test env, and the failure starts with the UnsafeAtomics/Atomix releases between 2026-09-22 and 2026-10-15.

Confirmed by running (local, julia +lts 1.10.12)

I ran this on a copy of main with the root env pinned to the versions CI's downgrade step picked (PrecompileTools =1.2.0, SciMLTesting =2.4.0, SafeTestsets =0.1.0):

Run Result
GROUP=All FAIL. Core passes (1200+5), AD passes (4), then the Enzyme group fails with UndefVarError: `IRBuilder` not defined at GPUCompiler/.../interface.jl:348, "Failed to precompile Enzyme". The log shows "1 dependency precompiled but a different version is currently loaded".
GROUP=Core pass (1200 + 5)
GROUP=AD pass (4)
GROUP=Enzyme pass (52 + 36), with Enzyme 0.13.216 and LLVM 9.13.2 in a fresh process

A separate script that loads both envs in one process (activate the AD env, using Tracker, then activate the Enzyme env, using Enzyme) prints AD loaded LLVM version: 10.2.1. using Enzyme then fails with the same IRBuilder error.

Read in logs or the registry (not run)

  • Package versions per env in the CI runs listed above.
  • Registry compat entries: UnsafeAtomics, GPUCompiler (2.3 - 2.10 needs LLVM 9, 2.11 - 2 needs LLVM 10), Enzyme (needs LLVM 9).
  • Release dates from the GitHub releases pages of UnsafeAtomics.jl, Atomix.jl and LLVM.jl (LLVM.jl v10.0.0 came out 2026-10-03).

Existing PRs

Fix

.github/workflows/Downgrade.yml now uses a fail-fast: false matrix over group: [Core, AD, Enzyme] and passes group: "${{ matrix.group }}" to SciML/.github/.github/workflows/downgrade.yml@v1, which has a group input. Other SciML repos already use this pattern, for example RecursiveArrayTools.jl.

  • Coverage: each group of "All" now runs in its own job and process, as in Tests.yml, so every downgrade test still runs and none are skipped. QA was never part of "All", and Core 32-bit is just another name for Core, so neither is affected.
  • Required checks: none, since branch protection on main is off and the ruleset sets no required status checks. The check names change to one per group.
  • Before/after: the before and after evidence is the local table above. GROUP=All fails, which is what the old workflow ran, and the three groups pass when run separately, which is what the new workflow runs. No Julia test file changed, and no test was skipped, marked broken or loosened.
  • Checks on the workflow file: it parses with yaml.safe_load, and typos is clean. actionlint is not installed, so it was not run. Runic is not needed because no Julia files changed. The change has not run on GitHub Actions, since nothing was pushed.
  • Still broken outside this lane: a plain local Pkg.test(), which defaults to "All", still hits this clash on any Julia version until Enzyme supports LLVM.jl 10. This fix only covers the CI Downgrade lane.

Local logs: scratch/logs/{all,core,ad,enzyme,inproc}.log.

Links


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.92 (fix), Claude Code 2.1.300 (PR) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium / claude-opus-5-5
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq (fleet master)

🤖 Generated with Claude Code

Independent review (added by the fleet master)

Risk assessment

  • Risk: low
  • Blast radius: Downgrade CI scheduling and check names only; no runtime code, public API, compatibility bounds, or dependencies change.
  • Evidence: Independently read the failing default-branch log: AD resolves LLVM 10.2.1, Enzyme resolves LLVM 9.13.2/GPUCompiler 2.10.0, followed by the IRBuilder error. Independently ran the Enzyme group in a fresh Julia 1.10.12 process: forward 52/52 and reverse 36/36 pass with Enzyme 0.13.216, GPUCompiler 2.10.0, LLVM 9.13.2. All three PR downgrade jobs pass. I also read the Enzyme downgrade job log: 52/52 forward and 36/36 reverse pass with the same dependency versions. Other CI remains pending.
  • Independent review: codex gpt-6.1-sol rated it low, high confidence: process isolation removes the demonstrated loaded-version collision without dropping tests.
  • Merge: auto-merge candidate — after all actual CI checks pass; this verdict is not a claim that the pending checks are green.

🤖 Section added by an AI agent — harness: Claude Code 2.1.300 · model: claude-opus-5-5 (review by codex-cli 0.162.1, gpt-6.1-sol)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq

The Downgrade lane ran GROUP=All, which activates test/AD and test/Enzyme
one after the other in the same Julia process. Since UnsafeAtomics 0.4
the AD env loads LLVM.jl 10, while every Enzyme release still requires
LLVM.jl 9 and resolves GPUCompiler 2.10. With LLVM 10 already loaded,
`using Enzyme` recompiles GPUCompiler 2.10 against it and fails with
`UndefVarError: IRBuilder not defined`. Running Core, AD and Enzyme as
separate matrix jobs (as Tests.yml already does) keeps each group in its
own process with its own resolved LLVM.jl.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <noreply@cognition.ai>
Agent-Harness: Devin CLI 3000.11.92
Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Agent-Session: local headless Devin run (fleet master green lane; no session URL)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 16, 2026 00:39
@ChrisRackauckas
ChrisRackauckas merged commit b26e5c8 into SciML:main Oct 16, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant