Replace Jacobi 3x3 eigensolver with closed form Cardano solution#758
Draft
kevinzakka wants to merge 1 commit intomainfrom
Draft
Replace Jacobi 3x3 eigensolver with closed form Cardano solution#758kevinzakka wants to merge 1 commit intomainfrom
kevinzakka wants to merge 1 commit intomainfrom
Conversation
93939c3 to
3fd4dfa
Compare
The iterative Jacobi solver (5 sweeps x 3 rotations) used Python level loops, each issuing small CUDA kernels whose launch overhead dominated wall time. Replace with Cardano's formula for eigenvalues and projector products for eigenvectors, reducing pseudo_inertia overhead from 232 ms to 97 ms per collection (4096 envs x 12 bodies, 24 calls, RTX 5070 Ti). Fixes #757
3fd4dfa to
415cec7
Compare
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.
The iterative Jacobi eigensolver in
dr.pseudo_inertiaused Python level loops (5 sweeps x 3 rotations), each issuing small CUDA kernels whose launch overhead dominated wall time. This replaces it with Cardano's formula for eigenvalues and projector products for eigenvectors, eliminating all loops.Benchmark (RTX 5070 Ti, 4096 envs x 12 bodies, 24 calls per collection):
Fixes #757