Skip to content

Route the NoAdjoint twin of the table cut through the wrapper - #1049

Merged
seabbs merged 2 commits into
mainfrom
fix/noadjoint-table-cut
Dec 4, 2026
Merged

seabbs merged 2 commits into
mainfrom
fix/noadjoint-table-cut

Conversation

@seabbs-bot

@seabbs-bot seabbs-bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1034.
The NoAdjoint twin of the table-cut registry scenario now takes plain AD, so its "no rule fires" check holds on the Enzyme and Mooncake reverse registry jobs.

Claude Opus 5.5 [medium]

Cause

_table_cut(w, θ) in test/ADFixtures/src/registry.jl never used w.
It called contributions(K; stop), which builds its own Convolution inside the package, so the twin ran the rule just as the scenario did.

Change

  • contributions(K; start, stop) now calls an internal _table_contributions(wrap, K; start, stop), which applies wrap to the convolution it builds. The public method passes identity, so its behaviour is unchanged.
  • The scenario passes its w there, so the twin wraps that convolution in NoAdjoint.
  • _REQUIRES for the scenario now also lists :_table_contributions, so a compat-floor leg on a release without it leaves the scenario out.

This is the fix from claude/noadjoint-table-cut (33c996b), with main merged in (no rebase).

Checks

The issue's reproducer with this branch, the same on Julia 1.12.7 and 1.13.4:

Mooncake reverse | Convolution lag contributions of a table cut at a report day: fired = true, gradient matches = true
Mooncake reverse | NoAdjoint Convolution lag contributions of a table cut at a report day: fired = false, gradient matches = true
Enzyme reverse | Convolution lag contributions of a table cut at a report day: fired = true, gradient matches = true
Enzyme reverse | NoAdjoint Convolution lag contributions of a table cut at a report day: fired = false, gradient matches = true

On main the twin reports fired = true.
AD versions (Julia 1.12) was dispatched on this branch: https://github.com/EpiAware/ComposableRecurrences.jl/actions/runs/47322079874

This was opened by a bot. Please ping @seabbs for any questions.

claude and others added 2 commits December 3, 2026 14:17
The table method of contributions builds its own convolution, so the
registry's table-cut scenario ignored the wrapper and its NoAdjoint twin
took the same rule. contributions(K; start, stop) now goes through an
internal _table_contributions(wrap, K; start, stop) that wraps that
convolution, and the scenario passes its wrapper there.

Closes #1034.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7ixCuG9cWCUmCJUmbPL
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.

NoAdjoint twin of the table-cut contributions scenario runs the rule

3 participants