Relax Zygote compat to allow 0.6.69+ and 0.7.x#309
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Jan 26, 2026
Merged
Relax Zygote compat to allow 0.6.69+ and 0.7.x#309ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas merged 1 commit intoSciML:masterfrom
Conversation
The strict Zygote = "0.7.10" compat was causing issues with downstream packages like NeuralPDE.jl. There is a bug in Julia's Base.Meta.partially_inline! function (a typo where `spvals` should be `static_param_values`) that gets triggered when Zygote differentiates through functions using @cfunction with type parameters (like Cubature.jl's integrands function). By relaxing the Zygote compat to allow older versions, downstream packages can resolve to Zygote versions that may avoid triggering this Julia bug through different code paths. This reverts the Zygote compat to what it was in Integrals v4.6.1. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/NeuralPDE.jl
that referenced
this pull request
Jan 26, 2026
Integrals.jl versions 4.7.0-4.9.0 have a strict `Zygote = "0.7.10"` compat which forces resolution to Zygote 0.7.10. This triggers a bug in Julia's `Base.Meta.partially_inline!` function when Zygote differentiates through Cubature's `@cfunction` with type parameters, causing `UndefVarError: spvals not defined in Base.Meta` errors. This caps Integrals to 4.6.x which has a broader Zygote compat (`"0.6.69, 0.7"`) allowing the resolver to pick Zygote versions that may avoid the bug. A fix has been merged to Integrals.jl (SciML/Integrals.jl#309) that relaxes the Zygote compat. Once a new Integrals version is released with that fix, this compat can be updated to allow newer versions again. Related: - Integrals.jl fix: SciML/Integrals.jl#309 - Julia bug: typo in base/meta.jl line 412 (spvals should be static_param_values) Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
2 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/NeuralPDE.jl
that referenced
this pull request
Jan 26, 2026
Integrals.jl v4.9.1 has been released with the relaxed Zygote compat (SciML/Integrals.jl#309), so we can now allow that version. Compat now allows: - 4.5.x - 4.6.x (original safe range with broad Zygote compat) - 4.9.1+ (new release with fix) Versions 4.7.0 - 4.9.0 are still excluded as they have strict Zygote = "0.7.10". Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Relaxes the Zygote compat from
"0.7.10"(strict) back to"0.6.69, 0.7"(which was the compat in v4.6.1).Problem
The strict
Zygote = "0.7.10"compat is causing issues with downstream packages like NeuralPDE.jl. When NeuralPDE resolves packages, it gets Integrals ≥4.7.0 which forces Zygote 0.7.10, which then triggers a bug in Julia'sBase.Meta.partially_inline!function.Root Cause
There's a typo bug in Julia's
base/meta.jl(introduced in commitb845695efrom June 2018) where line 412 referencesspvalsinstead ofstatic_param_values:This bug gets triggered when Zygote/IRTools calls
Base.Meta.partially_inline!on code containing@cfunctionwith type parameters (like Cubature.jl'sintegrands(d::D, ...) where {D}function).Why This Helps
By relaxing the Zygote compat, downstream packages can potentially resolve to older Zygote versions that may use different code paths that don't trigger the Julia bug. Even if it doesn't fully fix the issue, it gives more flexibility for workarounds.
Test plan
🤖 Generated with Claude Code