Skip to content

Fix quaternion gradient accumulation in GaussianProjectionJaggedBackward#534

Merged
swahtz merged 2 commits into
openvdb:mainfrom
swahtz:fix/warp_sum_quat_project_backward
Mar 11, 2026
Merged

Fix quaternion gradient accumulation in GaussianProjectionJaggedBackward#534
swahtz merged 2 commits into
openvdb:mainfrom
swahtz:fix/warp_sum_quat_project_backward

Conversation

@swahtz

@swahtz swahtz commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a new unit test to verify that Gaussian parameter gradients are correctly accumulated across multiple cameras in the projection backward pass, addressing a potential issue with warp-level reductions. It also includes a minor fix in the GaussianProjectionJaggedBackward kernel to ensure proper gradient accumulation for quaternions. The changes are grouped below by theme.

Testing improvements:

  • Added the TestProjectionGradsMultiCamera test class to tests/unit/test_gaussian_splat_3d.py, which verifies that gradients for all Gaussian parameters are correctly summed across cameras in both dense and jagged projection backward passes. This test ensures that warp-level reductions (warpSum) do not drop camera contributions, preventing silent bugs when multiple cameras share a warp for the same Gaussian.

CUDA kernel fix:

  • Fixed a bug in src/fvdb/detail/ops/gsplat/GaussianProjectionJaggedBackward.cu by adding a warpSum call for quaternion gradients (dLossDQuat), ensuring all camera contributions are properly accumulated in the jagged projection backward kernel.

swahtz added 2 commits March 12, 2026 09:16
…JaggedBackward kernel

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…ting

- Introduced `TestProjectionGradsMultiCamera` to verify correct summation of Gaussian parameter gradients across multiple cameras during the projection backward pass.
- Implemented tests for both dense and jagged paths, ensuring gradients are accurately computed and compared against independent single-camera renders.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
@swahtz swahtz added this to the v0.4 milestone Mar 11, 2026
@swahtz swahtz requested a review from a team as a code owner March 11, 2026 20:46
@swahtz swahtz added bug Something isn't working Gaussian Splatting Issues related to Gaussian splattng in the core library labels Mar 11, 2026
@swahtz swahtz requested review from blackencino and fwilliams March 11, 2026 20:46
@swahtz swahtz merged commit 9856e6d into openvdb:main Mar 11, 2026
35 checks passed
@swahtz swahtz deleted the fix/warp_sum_quat_project_backward branch March 11, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Gaussian Splatting Issues related to Gaussian splattng in the core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants