Add opt-in MJX solver scan loop - #3408
Open
devshahofficial wants to merge 1 commit into
Open
Conversation
devshahofficial
force-pushed
the
agent/pr3264-mjx-solver-scan
branch
from
July 16, 2026 22:10
f1692d2 to
284b98e
Compare
devshahofficial
marked this pull request as ready for review
July 20, 2026 15:34
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.
Draft follow-up for #3264 / #2259, based on the original reverse-mode autodiff fix from @ingyukoh.
The maintainer review concern on #3264 was avoiding a default solver performance change. This version keeps the scan loop opt-in through
OptionJAX.solver_scanand leaves the existingjax.lax.while_looppath as the default.Changes:
OptionJAX.solver_scan, defaulting toFalsein_put_option_while_loop_scanfor the outer solver loop only when opted inLocal validation:
python3 -m py_compile mjx/mujoco/mjx/_src/types.py mjx/mujoco/mjx/_src/io.py mjx/mujoco/mjx/_src/solver.py mjx/mujoco/mjx/_src/solver_test.pygit diff --checkCould not run the focused MJX runtime test locally because this base Python is missing
jax,jaxlib,absl-py, andmujoco.Opening as draft to avoid superseding the existing approved PR unless maintainers prefer this rebased/tested version.