Remove the makeshadow inlining workaround once EnzymeAD/Enzyme.jl#3322 is fixed - #187
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
Draft
Conversation
Reverts the @inline annotations that hide the struct-returning makeshadow helpers from Enzyme's module type classification, which cannot parse them on Julia <= 1.11 under nested differentiation (CallingConventionMismatchError). Mergeable once an Enzyme release fixes EnzymeAD/Enzyme.jl#3322; bump the Enzyme test compat to that release in this PR before merging. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5nf9KF4RRs1cpmjxG3NQe
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.
Important
Do not merge until EnzymeAD/Enzyme.jl#3322 is fixed and released. This PR should be ignored until reviewed by @ChrisRackauckas.
Follow-up to #183: removes the last Enzyme-bug workaround remaining in the EnzymeCore extension — the
@inlineannotations on the threemakeshadowhelpers (and restoreszero(dc)for theFixedSizeDiffCachecase).The annotations exist because Enzyme's module type-classification on Julia ≤ 1.11 cannot parse standalone functions returning immutable structs with mixed pointer/isbits fields when they end up inside a nested-differentiation module (
CallingConventionMismatchErrorinclassify_arguments, EnzymeAD/Enzyme.jl#3322). Inlining them makes the standalone functions disappear from the module.Current state (verified locally against Enzyme v0.13.181):
CallingConventionMismatchError— the single expected failure. The lts CI lane will be red for the same reason.This PR therefore functions as a canary: when an Enzyme release fixes #3322, re-running CI (which resolves the latest Enzyme) should turn it green. Before merging: bump the
Enzymeentry in[compat]to the release containing the fix, mirroring what #183 did for 0.13.181.🤖 Generated with Claude Code
https://claude.ai/code/session_01K5nf9KF4RRs1cpmjxG3NQe