Reduce shared memory usage in pinhole projection by re-arranging blocks#555
Merged
matthewdcong merged 2 commits intoMar 25, 2026
Merged
Conversation
fwilliams
approved these changes
Mar 20, 2026
fwilliams
left a comment
Collaborator
There was a problem hiding this comment.
Looks good and great catch! I have a few small comments but none that are blocking. Approved!
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
c931cb2 to
5a588c6
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.
Currently, each block loads all C cameras. Furthermore, the number of blocks scales with C and therefore our shared memory bandwidth scales as O(C^2). To address this, we parameterize the blocks with the cameras in the Y direction ensuring that each block only requires one camera. This enables us to load just the single camera into shared memory and have aggregate shared memory bandwidth that scales with C.
Note that this optimization doesn't apply to the non-pinhole case. In that scenario, the rasterization pass needs access to all the cameras since it is parameterized by tiles though it's possible this could be changed at a future point with more extensive refactoring.