Skip to content

Reduce shared memory usage in pinhole projection by re-arranging blocks#555

Merged
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:reduce_pinhole_smem_usage
Mar 25, 2026
Merged

Reduce shared memory usage in pinhole projection by re-arranging blocks#555
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:reduce_pinhole_smem_usage

Conversation

@matthewdcong

Copy link
Copy Markdown
Contributor

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.

@matthewdcong matthewdcong requested a review from a team as a code owner March 18, 2026 06:13
@harrism harrism requested a review from fwilliams March 18, 2026 22:20

@fwilliams fwilliams left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and great catch! I have a few small comments but none that are blocking. Approved!

Comment thread src/fvdb/detail/ops/gsplat/GaussianCameras.cuh
Comment thread src/fvdb/detail/ops/gsplat/GaussianCameras.cuh
Signed-off-by: Matthew Cong <mcong@nvidia.com>
Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong matthewdcong force-pushed the reduce_pinhole_smem_usage branch from c931cb2 to 5a588c6 Compare March 25, 2026 17:53
@matthewdcong matthewdcong merged commit 3e8624e into openvdb:main Mar 25, 2026
35 checks passed
@swahtz swahtz added this to the v0.5 milestone Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants