Skip to content

Add configurable bounds for hash-grid input dimensions#533

Closed
ayushozha wants to merge 1 commit intoNVlabs:masterfrom
ayushozha:ayush/enable-5d-hash-grid
Closed

Add configurable bounds for hash-grid input dimensions#533
ayushozha wants to merge 1 commit intoNVlabs:masterfrom
ayushozha:ayush/enable-5d-hash-grid

Conversation

@ayushozha
Copy link
Copy Markdown
Contributor

Summary

  • add configurable TCNN_HASH_MIN_DIM and TCNN_HASH_MAX_DIM build options for hash grids
  • thread the same dimension bounds through CMake and the PyTorch extension build
  • add test coverage and README usage notes for enabling 5D hash grids

Why

Issue #422 asks for 5D grid support. The current hash-grid dispatch is hard-coded to a narrow range of input dimensions, so enabling 5D grids requires rebuilding the library. This change makes the supported hash-grid dimension range explicit and configurable at build time while preserving the existing defaults.

Validation

  • python -m py_compile bindings/torch/setup.py
  • cmake -S . -B build-hash-dim-check -G Ninja -DTCNN_BUILD_TESTS=1 -DTCNN_HASH_MAX_DIM=5
  • cmake --build build-hash-dim-check --target test_grid
  • ctest --output-on-failure -V -R test_grid

Closes #422.

@ayushozha ayushozha force-pushed the ayush/enable-5d-hash-grid branch from 2113b4f to a88e66c Compare March 27, 2026 10:32
@ayushozha ayushozha marked this pull request as ready for review March 27, 2026 11:40
@Tom94
Copy link
Copy Markdown
Collaborator

Tom94 commented Apr 1, 2026

Thanks for the PR, however I'm not a fan of making this configurable in the first place. It's a lot of boilerplate for something the user could enable with a very simple patch file / fork of tcnn.

@Tom94 Tom94 closed this Apr 1, 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.

Enable 5D grids

2 participants