Repository navigation
Add checkpointed reverse AD for native orbit and split-collision solvers - #191
eduardolneto wants to merge 34 commits into
Conversation
00560aa to
9199e0b
Compare
…enter collision step The Ito speed drift contains 2 D_par/v, which diverges as v -> 0. Explicit Euler overshoots it whenever v^2 < 2 D_par h, throwing slow ions to nonthermal speeds (up to ~100 kT for a 1 keV bath). Applying it as v -> sqrt(v1^2 + 4 D_par h) keeps the drift to O(h) and v > 0. The Spitzer test now runs to 6 tau_s and checks relaxation to 3T/2.
…to feat/native_ad_split # Conflicts: # essos/dynamics.py
…to feat/native_ad_split
…to feat/native_ad_split
|
Same as other PRs |
|
Eduardo, status on the native reverse AD. #198 (into this branch) applies the same trim as #197 on #189, plus:
That is +195 / -3736. The QI examples stay in this branch's history if we want them back later. #210 builds on #198. It shares the kernel helpers between the split and AD paths and keeps one benchmark script. The native gradient matches the shared JAX path to about 1e-16. Order I'd suggest: #189 with a merge commit, then this PR, with #198 and #210 merged into it first. |
|
Main moved and this PR now conflicts in essos/dynamics.py. I did not push to your branch. #252 merges main into feat/native_ad_split and targets it. This branch contains the old head of #189, so #252 merges the resolved #189 merge (#251), which has main in it. That merge had no new textual conflicts. The resolution and the rk.py Tests under JAX_ENABLE_X64=1: test_native_ad.py, test_native_orbit.py, test_native_split.py and test_dynamics.py, 172 passed. Merging #252 clears the conflict here. |
Base branch: feat/native_split_collisions
Add accepted-step reverse differentiation for native Dopri5/Dopri8 orbits and split orbit–collision tracing, consolidated in essos/native_ad.py.
Validation: Frozen-schedule JVP comparisons, CPU regressions, GC/Lorentz/coordinate GPU audits, and tiny ALM execution checks. The AD test module contains 14 functions covering 17 cases. Full QI optimization runs remain untested.
GPU limitation: Specialized two-species QI compilation was killed locally. Those examples default to validated shared native JAX execution on the selected device; specialized execution remains opt-in.