Implement tiled kernels for CG solver#1399
Merged
Merged
Conversation
…lize parameters and adjust launch arguments
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
thowell
reviewed
Jun 3, 2026
# Conflicts: # mujoco_warp/_src/solver.py
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
thowell
reviewed
Jun 4, 2026
adenzler-nvidia
left a comment
Collaborator
There was a problem hiding this comment.
Nice result on cloth, and I traced the CG path as functionally correct — the prev_grad/prev_Mgrad relocation, the fused solve_cg_finalize, and the reordered done-check are all equivalent to the kernels they replace.
A few cleanups I'd like before merge; inline comments cover the rest:
- Dead kernel
_solve_prev_grad_Mgrad(solver.py:3152) is no longer launched anywhere — the per-iteration prev_grad/prev_Mgrad snapshot now happens inside_solve_init_search_cg_tiledand_solve_search_update_cg_tiled. No remaining references repo-wide (only the_islandvariant is still used). Please remove. - Dead kernel
_solve_beta_finalize(solver.py:3247) — its logic is now inlined into solve_cg_finalize (step 1) and it is no longer launched. Please remove.
thowell
approved these changes
Jun 5, 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.
Uh oh!
There was an error while loading. Please reload this page.