[Perf] | fix LDS bank conflicts and reduce LDS traffic in func_broad_phase_lds#47
Draft
rtmadduri wants to merge 1 commit intoamd-integrationfrom
Draft
[Perf] | fix LDS bank conflicts and reduce LDS traffic in func_broad_phase_lds#47rtmadduri wants to merge 1 commit intoamd-integrationfrom
rtmadduri wants to merge 1 commit intoamd-integrationfrom
Conversation
yaoliu13
requested changes
Apr 29, 2026
Collaborator
There was a problem hiding this comment.
This PR is not based on the latest amd-integration: perf/rtm/fix-lds-bank-conflicts...ROCm:Genesis:amd-integration
Please read Confluence "Genesis PR Review Process"
Collaborator
Author
|
@yaoliu13 there are several merge conflicts. I am marking this as draft. I will reopen after fixing those conflicts |
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
This PR optimizes the LDS-resident Sweep-and-Prune broadphase kernel (func_broad_phase_lds) in genesis/engine/solvers/rigid/collider/broadphase.py. The kernel runs with ENVS_PER_BLOCK = 16 envs per workgroup, each owning a row of several LDS arrays of width MAX_SORT_ELEM_NUM = 2 * MAX_GEOMS_IN_LDS = 92. The kernel was bottlenecked on LDS bandwidth in the inner insertion-sort and sweep loops, both because the row stride collided in the LDS bank pattern and because each iteration touched more LDS arrays than necessary.
What changed