Write only lower triangle in _JTDAJ_sparse#1275
Merged
adenzler-nvidia merged 2 commits intogoogle-deepmind:mainfrom Apr 2, 2026
Merged
Conversation
The H matrix assembly in _JTDAJ_sparse was writing both triangles (two atomic adds per off-diagonal pair), but the Cholesky factorization only reads the lower triangle. Write a single entry to the lower triangle instead, halving the number of atomic adds for off-diagonal elements.
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.
Summary
_JTDAJ_sparsewas writing both triangles of the H matrix (twoatomic_addper off-diagonal pair), but the Cholesky factorization only reads the lower triangleBenchmark
three_humanoids (8192 worlds, nconmax=100, njmax=192, RTX PRO 6000 Blackwell):
Solver convergence is unchanged (mean 2.784 iters, p95=5, 8192/8192 converged).
Nsight Systems kernel-level profile confirms
_JTDAJ_sparsedrops from 1,248ms to 731ms per 1000 steps (-41%).Test plan
solver_test.py(40/40 passed)smooth_test.py(59/59 passed)forward_test.py(60/60 passed)