Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OOB when only a small number of Gaussians are in the view #100

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Xanthorapedia
Copy link

@Xanthorapedia Xanthorapedia commented Jan 11, 2024

This PR fixes multiple out-of-bound issues when only a small number of (or even 0) Gaussians are in the view:

  • compute_cumulative_intersects should not access cum_tiles_hit, which has size 0 if no Gaussian is in the scene;
  • Per-point kernels such as compute_cov2d_bounds_tensor should not be launched with 0 thread blocks, otherwise a CUDA invalid configuration exception will be thrown.
  • tile_bins returned by get_tile_bin_edges_tensor now has size tile_bounds[0] * tile_bounds[1] instead of num_intersects (could be 0 if no visible Gaussian), which makes sure access to tile_bins[tile_id] in rasterization kernels guaranteed to stay in the range of tile_bins.

In addition, per @kerrj's suggestion #84 (comment), rasterization functions now directly return a tensor with all pixel values set to the background.

Closes #84.

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.

CUDA invalid configuration if no Gaussian is in view
1 participant