Skip to content

Remove the makeshadow inlining workaround once EnzymeAD/Enzyme.jl#3322 is fixed - #187

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/remove-3322-workaround
Draft

Remove the makeshadow inlining workaround once EnzymeAD/Enzyme.jl#3322 is fixed#187
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/remove-3322-workaround

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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 @inline annotations on the three makeshadow helpers (and restores zero(dc) for the FixedSizeDiffCache case).

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 (CallingConventionMismatchError in classify_arguments, EnzymeAD/Enzyme.jl#3322). Inlining them makes the standalone functions disappear from the module.

Current state (verified locally against Enzyme v0.13.181):

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 Enzyme entry 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

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
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.

2 participants