Skip to content

Commit

Permalink
add assert in traverse_grids
Browse files Browse the repository at this point in the history
  • Loading branch information
liruilong940607 committed Apr 25, 2023
1 parent 4581d95 commit c93eaad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmarks/kplanes
2 changes: 1 addition & 1 deletion benchmarks/tensorf
Submodule tensorf updated 2 files
+4 −2 script.sh
+286 −119 train.py
2 changes: 1 addition & 1 deletion benchmarks/tineuvox
6 changes: 5 additions & 1 deletion nerfacc/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ def traverse_grids(
far_planes = torch.full_like(rays_o[:, 0], float("inf"))

if rays_mask is None:
rays_mask = torch.Tensor()
rays_mask = torch.Tensor() # Dummy tensor.
if traverse_steps_limit is None:
traverse_steps_limit = -1
if over_allocate:
assert (
traverse_steps_limit > 0
), "traverse_steps_limit must be set if over_allocate is True."

if t_sorted is None or t_indices is None or hits is None:
# Compute ray aabb intersection for all levels of grid. [n_rays, m]
Expand Down

0 comments on commit c93eaad

Please sign in to comment.