Repository navigation
Trim the native stack: shared kernel helpers, one benchmark script, JAX 0.12 split fix - #210
Open
rogeriojorge wants to merge 19 commits into
Open
rogeriojorge wants to merge 19 commits into
rogeriojorge wants to merge 19 commits into
Conversation
…12 split lowering
…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.
…mples; add Ito/Stratonovich, absent-bath and low-energy tests
This was referenced Nov 14, 2026
…ortable path if the fused kernel cannot lower
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.
Trims #198 further. Based on
simplify/native-ad, so the diff is the delta only.What
kernel_tableau,save_loop,launch_kernel,require_cuda, validation) inrk.py; 16 benchmark scripts becomeexamples/benchmarks/benchmark_native.py(--suite orbit|collisions).native_execution="cuda"raises.split.py(execution="independent",interpret, the scalar-graph helpers, its tests and the split benchmark suite).trace_splitkeeps the portable path.native_ad.py,tests/test_native_ad.py,optimize_coils_native_ad.py, theadjoint="accepted"/native_adjointoptions insolve_rk,solve_splitandTracing, the AD README section and the AD benchmark suite. Gradients go through Diffrax/JAX AD.rk.py, and the portable split path.prepare_solver(..., execution="cuda")lowers a small Pallas probe once; if the installed JAX cannot lower it, it warns and uses the portable path. Test:test_unsupported_pallas_lowering_falls_back_to_portable_path.Why
Size
native_ad.py1569,split.py2596 -> 1215 lines).Checks
-n 2:tests/test_native_orbit.pyandtests/test_native_split.py, 41 passed in 7 min at load about 150-250. Not run on GPU (office box busy); the kernel probe returns False on CPU, so only the fallback branch is covered.Open