Skip to content

Materialize repeated opacities for compatibility with multiple splatting implementations#600

Merged
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:expand_opacities
Apr 13, 2026
Merged

Materialize repeated opacities for compatibility with multiple splatting implementations#600
matthewdcong merged 2 commits into
openvdb:mainfrom
matthewdcong:expand_opacities

Conversation

@matthewdcong

@matthewdcong matthewdcong commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Currently, we unsqueeze and expand the opacities (following the optimization in #451) creating a non-contiguous view. However, the image space mGPU rasterization and world space rasterization implementations require contiguous expanded opacities. This PR changes opacities to always be expanded for consistent behavior across multiple splatting implementations. Note that we can't simply call contiguous() in the specific operator impl because the shared autograd code caches the opacities for the backwards pass.

This undoes the optimization in #451 and results in a small (~0.5%) decrease in performance in the single GPU case. However, this is outweighed by the corresponding speedups in the mGPU and world space case due to one fewer allocation and more efficient paging.

Signed-off-by: Matthew Cong <mcong@nvidia.com>
@matthewdcong matthewdcong requested a review from a team as a code owner April 13, 2026 15:28
Comment thread fvdb/gaussian_splatting.py Outdated
Signed-off-by: Matthew Cong <mcong@nvidia.com>

@swahtz swahtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks!

@matthewdcong matthewdcong merged commit 8fb893b into openvdb:main Apr 13, 2026
38 checks passed
@swahtz swahtz added this to the v0.5 milestone Jun 16, 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