Relax Zygote compat from 0.7.10 to 0.7#532
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Jan 26, 2026
Merged
Conversation
This allows using any Zygote 0.7.x version, which is needed to work around a Julia base bug (typo in Base.Meta.partially_inline!) that is triggered by Zygote 0.7.10 when differentiating through @cfunction with type parameters. The specific error occurs in Julia's base/meta.jl:412 where `spvals` is used instead of `static_param_values`, causing an "UndefVarError: `spvals` not defined" error when using Zygote with packages like Cubature.jl. By relaxing the constraint to allow Zygote 0.7.0-0.7.9, downstream packages can avoid this bug until Julia fixes the typo in base. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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
0.7.10to0.7Rationale
There's a typo bug in Julia's base/meta.jl (line 412) where
spvalsis used instead ofstatic_param_values. This bug causes anUndefVarError: spvals not defined in Base.Metaerror when Zygote 0.7.10 is used to differentiate through functions that use@cfunctionwith type parameters (like Cubature.jl's integration routines).By relaxing the constraint to allow Zygote 0.7.0-0.7.9, downstream packages like NeuralPDE.jl can work around this bug until Julia fixes the typo in base.
This is part of a series of PRs to relax Zygote constraints across the SciML ecosystem:
🤖 Generated with Claude Code