Skip to content

fix(transform): preserve checkpointed scan sharding on older JAX - #261

Merged
NousLoop merged 3 commits into
mainfrom
fix/ci-regressions
Nov 20, 2026
Merged

NousLoop merged 3 commits into
mainfrom
fix/ci-regressions

Conversation

@NousLoop

Copy link
Copy Markdown
Contributor

Checkpointed scan lost output sharding and manual-axis variation when older JAX converted traced outputs to ShapeDtypeStruct. Build collection buffers from the traced output avals instead. On JAX 0.9/0.10 use contiguous row updates to avoid scatter-transpose mesh conversions; retain explicitly sharded scatter updates on newer JAX, whose dynamic-update transpose does not preserve the required cotangent sharding. The caller continues masking padded writes.

Validation on Windows CPU with eight forced host devices:

  • Reproduced the original five JAX 0.9 failures.
  • Loop collection, non-collection and sharding suites: 80 passed on each of JAX 0.9.0, 0.10.0, 0.11.0 and 0.12.0.1, including reverse-mode checks against lax.scan.
  • Full package mypy: no issues in 108 source files.
  • No tests skipped, tolerance changes or version-matrix reductions.
  • Pre-commit also reports existing pyupgrade/flake8 issues in the touched modules; unrelated annotation rewrites were not retained.

Release note: Restore checkpointed scan sharding and gradient compatibility with JAX 0.9 and 0.10.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@NousLoop
NousLoop merged commit b25412b into main Nov 20, 2026
7 checks passed
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.

1 participant