Repository navigation
Simplify native AD, its tests, examples and README - #198
Open
rogeriojorge wants to merge 13 commits into
Open
rogeriojorge wants to merge 13 commits into
rogeriojorge wants to merge 13 commits into
Conversation
Applies the changes of the split-solver simplification PR (split.py, its tests, benchmarks, results and README) to the AD branch, keeping the accepted-map recording hooks and the AD-branch fix for the scalar-lowering common-subexpression pass. The AD benchmark follows the reduced SplitStats.
native_ad.py: one tableau/dense selector, one shared checkpointed orbit reverse for the orbit and split rules, one recorder configuration, no unused replay options. Tests check reverse gradients against forward mode and finite differences through the frozen schedule, the adjoint identity, checkpoint independence and conservation laws, and run the persistent GPU kernels through the Pallas interpreter against shared reverse. The two particle-optimization examples are table-driven; the two reference confinement scripts are one script. Unused legacy options of the particle objectives are removed.
…d QI ALM examples; add Spitzer, Ito/Stratonovich, absent-bath and low-energy tests
This was referenced Nov 14, 2026
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.
Simplifies the AD branch, stacked on #191 (base
feat/native_ad_split).What
split.py, tests and benchmarks; simplification of Add checkpointed reverse AD for native orbit and split-collision solvers #191's own additions (native_ad.py, examples, README). Gradients are bitwise identical before and after in the benchmark cases listed in the earlier version of this description.optimize_coils_native_ad.py) and one split example (native_split_slowing_down.py) remain. README: one section each, no figures.v = sqrt(v1^2 + 4 D_par h)update and the existing gradient checks stay.Checks
test_native_ad.pypass (the same test files passed in full on Trim the native stack: shared kernel helpers, one benchmark script, JAX 0.12 split fix #210, 103 tests).feat/native_ad_splitalready contains the head offeat/native_split_collisionsthrough a merge, and several fixes exist twice under different SHAs (JAX 0.12 SearchSorted, 0.6.2 lowering, float64 diffusion check, 256-colour PNGs, save-loop read).mainmerges cleanly into both. If Add adaptive native split orbit and collision tracing #189 is squash-merged first, Add checkpointed reverse AD for native orbit and split-collision solvers #191 will conflict insplit.py, the split tests and the README. Merge Add adaptive native split orbit and collision tracing #189 with a merge commit, or retarget Add checkpointed reverse AD for native orbit and split-collision solvers #191 tofeat/native_split_collisions, and the diff of Add checkpointed reverse AD for native orbit and split-collision solvers #191 shrinks to the AD part.