Skip to content

Julia 1.13 Core CI fails with Enzyme 0.13.182 pending upstream release #1260

Description

@ChrisRackauckas-Claude

Summary

The Julia pre-release Core job currently fails on clean Optimization master because Enzyme v0.13.182 cannot differentiate Julia 1.13 BLAS dot lowering. The upstream Enzyme fix is already merged, but it is one commit newer than the v0.13.182 release.

This was observed while checking the unrelated downstream-workflow PR #1259. It reproduces on unmodified Optimization master, so it is not caused by that PR.

Clean reproduction

Optimization commit: b10c52b76212214aa43390eecd12ee87055f6c68

timeout 7200 env GROUP=Core julia +1.13.0-rc1 --startup-file=no --project=. -e 'using Pkg; Pkg.test(; coverage=false)'

The resolver selected Enzyme v0.13.182. The Core run reached:

AD Tests | 122 pass, 1 error, 123 total
ADTypes.AutoEnzyme(): Error During Test at test/ADtests.jl:79
EnzymeNoDerivativeError:
No augmented forward pass found for ijl_lazy_load_and_lookup
Stacktrace:
 [1] dot at LinearAlgebra/src/blas.jl:356
 [4] lagrangian at lib/OptimizationBase/ext/OptimizationEnzymeExt.jl:80

The corresponding CI job is https://github.com/SciML/Optimization.jl/actions/runs/29183890630/job/86626874064.

Minimal reproducer and version isolation

The failure reduces to Enzyme plus LinearAlgebra; no Optimization code is required:

using Enzyme, LinearAlgebra

f(x, λ) = dot(λ, x)
x = [1.0, 2.0]
dx = zeros(2)
λ = [3.0, 4.0]
Enzyme.autodiff(
    Enzyme.Reverse,
    Enzyme.Const(f),
    Enzyme.Active,
    Enzyme.Duplicated(x, dx),
    Enzyme.Const(λ),
)
@show dx

Observed with the same Enzyme v0.13.182:

  • Julia 1.12.6: passes, dx = [3.0, 4.0]
  • Julia 1.13.0-beta3: fails with ijl_lazy_load_and_lookup
  • Julia 1.13.0-rc1: fails with ijl_lazy_load_and_lookup

On Julia 1.13.0-rc1, the same reproducer passes against Enzyme main and returns dx = [3.0, 4.0].

Culprit/fix isolation

The range from Enzyme v0.13.182 to current Enzyme main contains exactly one commit:

  • v0.13.182: c8df91adf4dc129bb1083f0668b595df50222939 — fails
  • 23ff63088cd6532ea0d58bcdc279573bec6e2731 — passes

That commit is EnzymeAD/Enzyme.jl#3321, 1.13: Fix dynamic call load, whose parent is exactly the v0.13.182 commit. The broader Julia 1.13 BLAS-lowering regression was tracked in EnzymeAD/Enzyme.jl#3083.

Resolution

Once an Enzyme release containing 23ff630 reaches General, rerun the Julia pre-release Core job. A local Optimization workaround should not be needed because the failure is in Enzyme handling of Julia 1.13 dynamic BLAS calls and the upstream fix passes the minimal reproducer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions