Skip to content

Commit 81ca796

Browse files
feat(gsplat): add from-world rasterization path and UT integration
Introduce differentiable dense from-world Gaussian rasterization with UT-aligned camera/projection APIs, gradient-capable render paths, and focused C++/Python coverage for correctness and regression safety. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3554e21 commit 81ca796

File tree

128 files changed

+17113
-1260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+17113
-1260
lines changed

.github/workflows/cu130-nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: fVDB Nightly Build and Tests -- CUDA 13.0.1
1+
name: fVDB Nightly Build and Tests -- CUDA 13.0.2
22

33
on:
44
# schedule:
@@ -19,7 +19,7 @@ jobs:
1919
runs-on:
2020
- self-hosted
2121
container:
22-
image: nvidia/cuda:13.0.1-cudnn-devel-ubuntu22.04
22+
image: nvidia/cuda:13.0.2-cudnn-devel-ubuntu22.04
2323
env:
2424
PYTHONPATH: ""
2525
CPM_SOURCE_CACHE: "/__w/cpm_cache"
@@ -164,7 +164,7 @@ jobs:
164164
runs-on:
165165
- self-hosted
166166
container:
167-
image: nvidia/cuda:13.0.1-cudnn-devel-ubuntu22.04
167+
image: nvidia/cuda:13.0.2-cudnn-devel-ubuntu22.04
168168
env:
169169
PYTHONPATH: ""
170170
options: --rm

.github/workflows/cu130.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: fVDB CUDA 13.0.1 Build and Test
1+
name: fVDB CUDA 13.0.2 Build and Test
22

33
on:
44
pull_request_target:
@@ -61,7 +61,7 @@ jobs:
6161
needs: start-build-runner
6262
runs-on: ${{ needs.start-build-runner.outputs.label }}
6363
container:
64-
image: nvidia/cuda:13.0.1-cudnn-devel-ubuntu22.04
64+
image: nvidia/cuda:13.0.2-cudnn-devel-ubuntu22.04
6565
env:
6666
PYTHONPATH: ""
6767
CPM_SOURCE_CACHE: "/__w/cpm_cache"
@@ -229,7 +229,7 @@ jobs:
229229
name: fVDB GTests
230230
runs-on: ${{ needs.start-tests-gpu-runner.outputs.label }} # run the job on the newly created runner
231231
container:
232-
image: nvidia/cuda:13.0.1-cudnn-runtime-ubuntu22.04
232+
image: nvidia/cuda:13.0.2-cudnn-runtime-ubuntu22.04
233233
env:
234234
PYTHONPATH: ""
235235
CPM_SOURCE_CACHE: "/__w/cpm_cache"
@@ -332,7 +332,7 @@ jobs:
332332
name: fVDB PyTests
333333
runs-on: ${{ needs.start-tests-gpu-runner.outputs.label }} # run the job on the newly created runner
334334
container:
335-
image: nvidia/cuda:13.0.1-cudnn-devel-ubuntu22.04
335+
image: nvidia/cuda:13.0.2-cudnn-devel-ubuntu22.04
336336
env:
337337
PYTHONPATH: ""
338338
options: --rm
@@ -421,7 +421,7 @@ jobs:
421421
name: fVDB Documentation Tests
422422
runs-on: ${{ needs.start-tests-gpu-runner.outputs.label }} # run the job on the newly created runner
423423
container:
424-
image: nvidia/cuda:13.0.1-cudnn-runtime-ubuntu22.04
424+
image: nvidia/cuda:13.0.2-cudnn-runtime-ubuntu22.04
425425
env:
426426
PYTHONPATH: ""
427427
options: --rm

build.sh

Lines changed: 131 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ usage() {
2929
echo " lineinfo Enable CUDA lineinfo (sets FVDB_LINEINFO=ON)."
3030
echo " strip_symbols Strip symbols from the build (will be ignored if debug is enabled)."
3131
echo " verbose Enable verbose build output for pip and CMake."
32+
echo " trace Enable CMake trace output for debugging configuration."
3233
echo ""
3334
echo " Any modifier arguments not matching above are passed through to pip."
3435
exit 0
@@ -145,6 +146,70 @@ PY
145146
fi
146147
}
147148

149+
# --- Path Sanitization for Virtualized Environments ---
150+
# In certain virtualized or hybrid environments, the PATH may include directories
151+
# on slow or remote-mounted filesystems (e.g., /mnt/* host mounts, /media/sf_* for
152+
# VirtualBox, /mnt/hgfs/* for VMware). CMake's find_library() searches these paths,
153+
# and each filesystem operation on such mounts can go through slow protocols (9P, vboxsf,
154+
# vmhgfs-fuse), causing significant delays during configuration.
155+
# By filtering out these paths, we prevent CMake from crawling slow directories.
156+
157+
has_slow_host_mounts() {
158+
# Detect virtualized environments that may have slow host filesystem mounts
159+
# - WSL/WSL2: /mnt/* paths use 9P protocol
160+
# - VirtualBox: /media/sf_* paths use vboxsf
161+
# - VMware: /mnt/hgfs/* paths use vmhgfs-fuse
162+
if [ -f /proc/version ]; then
163+
grep -qi "microsoft\|wsl" /proc/version && return 0
164+
fi
165+
# VirtualBox Guest Additions
166+
if [ -d /media/sf_* ] 2>/dev/null || grep -q vboxsf /proc/filesystems 2>/dev/null; then
167+
return 0
168+
fi
169+
# VMware Tools
170+
if [ -d /mnt/hgfs ] || grep -q vmhgfs /proc/filesystems 2>/dev/null; then
171+
return 0
172+
fi
173+
return 1
174+
}
175+
176+
filter_slow_mount_paths() {
177+
local input_path="$1"
178+
if has_slow_host_mounts; then
179+
# Filter out paths on slow host filesystem mounts:
180+
# - /mnt/* (WSL host mounts, VMware hgfs)
181+
# - /media/sf_* (VirtualBox shared folders)
182+
echo "$input_path" | tr ':' '\n' | grep -v -E "^/mnt/|^/media/sf_" | tr '\n' ':' | sed 's/:$//'
183+
else
184+
echo "$input_path"
185+
fi
186+
}
187+
188+
run_with_sanitized_paths() {
189+
# Run a command with sanitized paths in virtualized environments, or normally otherwise.
190+
# This prevents CMake from searching slow host-mounted filesystems.
191+
if has_slow_host_mounts; then
192+
local sanitized_path
193+
sanitized_path=$(filter_slow_mount_paths "$PATH")
194+
195+
# Build env command with sanitized variables
196+
local env_args=("PATH=$sanitized_path")
197+
198+
# Also sanitize CMAKE_PREFIX_PATH and CMAKE_LIBRARY_PATH if set
199+
if [ -n "$CMAKE_PREFIX_PATH" ]; then
200+
env_args+=("CMAKE_PREFIX_PATH=$(filter_slow_mount_paths "$CMAKE_PREFIX_PATH")")
201+
fi
202+
if [ -n "$CMAKE_LIBRARY_PATH" ]; then
203+
env_args+=("CMAKE_LIBRARY_PATH=$(filter_slow_mount_paths "$CMAKE_LIBRARY_PATH")")
204+
fi
205+
206+
echo "Virtualized environment detected: Running with sanitized paths (excluding slow host mounts for performance)"
207+
env "${env_args[@]}" "$@"
208+
else
209+
"$@"
210+
fi
211+
}
212+
148213
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
149214
usage
150215
fi
@@ -169,6 +234,40 @@ CONFIG_SETTINGS=""
169234
PASS_THROUGH_ARGS=""
170235
CUDA_ARCH_LIST_ARG="default"
171236

237+
# --- Set CUDA_HOME / Hints ---
238+
# This helps scikit-build-core find the CUDA toolkit directly.
239+
#
240+
# We only auto-detect CUDA_HOME for Conda environments, and only when:
241+
# 1. CUDA_HOME is not already set (respect user's explicit choice)
242+
# 2. The Conda environment actually has nvcc installed
243+
#
244+
# In venv environments, PyTorch ships with rpathed CUDA libraries, so we leave
245+
# CUDA_HOME unset to avoid version mismatches. Users can still set CUDA_HOME
246+
# explicitly if needed.
247+
248+
if [ -n "$CONDA_PREFIX" ] && [ -z "$CUDA_HOME" ] && [ -x "$CONDA_PREFIX/bin/nvcc" ]; then
249+
echo "Conda environment with CUDA detected. Setting CUDA_HOME to $CONDA_PREFIX"
250+
export CUDA_HOME="$CONDA_PREFIX"
251+
elif [ -n "$CONDA_PREFIX" ] && [ -n "$CUDA_HOME" ]; then
252+
echo "Conda environment detected, but CUDA_HOME is already set to $CUDA_HOME (keeping existing value)"
253+
fi
254+
255+
# Export hints to help CMake find CUDA (only if CUDA_HOME is set)
256+
if [ -n "$CUDA_HOME" ]; then
257+
# Always pass CUDA_TOOLKIT_ROOT_DIR as a search hint
258+
CONFIG_SETTINGS+=" --config-settings=cmake.define.CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME"
259+
260+
# Only set CUDACXX and CMAKE_CUDA_COMPILER if nvcc actually exists at that location.
261+
# This avoids hard failures when CUDA_HOME points to a runtime-only installation.
262+
if [ -x "$CUDA_HOME/bin/nvcc" ]; then
263+
export CUDACXX="${CUDA_HOME}/bin/nvcc"
264+
CONFIG_SETTINGS+=" --config-settings=cmake.define.CMAKE_CUDA_COMPILER=$CUDACXX"
265+
else
266+
echo "Warning: CUDA_HOME is set to $CUDA_HOME but nvcc not found at $CUDA_HOME/bin/nvcc"
267+
echo " CMake will attempt to find nvcc elsewhere."
268+
fi
269+
fi
270+
172271
# Default values for nanovdb_editor build options
173272
NANOVDB_EDITOR_SKIP=OFF
174273
NANOVDB_EDITOR_FORCE=OFF
@@ -188,6 +287,10 @@ while (( "$#" )); do
188287
echo "Enabling verbose build"
189288
CONFIG_SETTINGS+=" -v -C build.verbose=true"
190289
is_config_arg_handled=true
290+
elif [[ "$1" == "trace" ]]; then
291+
echo "Enabling CMake trace"
292+
CONFIG_SETTINGS+=" --config-settings=cmake.args=--trace-expand"
293+
is_config_arg_handled=true
191294
elif [[ "$1" == "debug" ]]; then
192295
echo "Enabling debug build"
193296
CONFIG_SETTINGS+=" --config-settings=cmake.build-type=Debug -C cmake.define.CMAKE_BUILD_TYPE=Debug"
@@ -248,16 +351,16 @@ fi
248351
if [ "$BUILD_TYPE" == "wheel" ]; then
249352
echo "Build wheel"
250353
echo "pip wheel . --no-deps --wheel-dir dist/ $PIP_ARGS"
251-
pip wheel . --no-deps --wheel-dir dist/ $PIP_ARGS
354+
run_with_sanitized_paths pip wheel . --no-deps --wheel-dir dist/ $PIP_ARGS
355+
252356
elif [ "$BUILD_TYPE" == "install" ]; then
253357
echo "Build and install package"
358+
# Always use --force-reinstall to ensure the freshly built package is installed,
359+
# even if pip thinks the version is already satisfied. The --no-deps flag ensures
360+
# this only affects fvdb-core itself, not dependencies like torch.
254361
echo "pip install --no-deps --force-reinstall $PIP_ARGS ."
255-
pip install --no-deps --force-reinstall $PIP_ARGS .
256-
# TODO: Fix editable install
257-
# else
258-
# echo "Build and install editable package"
259-
# echo "pip install $PIP_ARGS -e . "
260-
# pip install $PIP_ARGS -e .
362+
run_with_sanitized_paths pip install --no-deps --force-reinstall $PIP_ARGS .
363+
261364
elif [ "$BUILD_TYPE" == "ctest" ]; then
262365

263366
# --- Ensure Test Data is Cached via CMake Configure Step ---
@@ -279,7 +382,7 @@ elif [ "$BUILD_TYPE" == "ctest" ]; then
279382

280383
echo "Running CMake configure in temporary directory ($TEMP_BUILD_DIR) to trigger data download..."
281384
pushd "$TEMP_BUILD_DIR" > /dev/null
282-
cmake "$SOURCE_DIR/src/cmake/download_test_data"
385+
run_with_sanitized_paths cmake "$SOURCE_DIR/src/cmake/download_test_data"
283386
popd > /dev/null # Back to SOURCE_DIR
284387

285388
# Clean up temporary directory
@@ -289,14 +392,24 @@ elif [ "$BUILD_TYPE" == "ctest" ]; then
289392

290393
# --- Find and Run Tests ---
291394
echo "Searching for test build directory..."
292-
# Find the directory containing the compiled tests (adjust if needed)
293-
# Using -print -quit to stop after the first match for efficiency
294-
BUILD_DIR=$(find build -name tests -type d -print -quit)
295-
296-
if [ -z "$BUILD_DIR" ]; then
297-
echo "Error: Could not find build directory with tests"
298-
echo "Please enable tests by building with pip argument"
299-
echo "-C cmake.define.FVDB_BUILD_TESTS=ON"
395+
# Find CMakeCache.txt to locate the build root
396+
CMAKE_CACHE=$(find build -name CMakeCache.txt -type f -print -quit 2>/dev/null)
397+
398+
if [ -z "$CMAKE_CACHE" ]; then
399+
echo "Error: Could not find CMakeCache.txt in build directory"
400+
echo "Please build the project first with tests enabled:"
401+
echo "pip install . -C cmake.define.FVDB_BUILD_TESTS=ON"
402+
exit 1
403+
fi
404+
405+
# Construct the test directory path (where CTestTestfile.cmake is generated)
406+
# This discovers all tests from both src/tests/ and src/dispatch/
407+
BUILD_DIR="$(dirname "$CMAKE_CACHE")/src"
408+
409+
if [ ! -f "$BUILD_DIR/CTestTestfile.cmake" ]; then
410+
echo "Error: No CTestTestfile.cmake found in $BUILD_DIR"
411+
echo "Please enable tests by building with:"
412+
echo "pip install . -C cmake.define.FVDB_BUILD_TESTS=ON"
300413
exit 1
301414
fi
302415
echo "Found test build directory: $BUILD_DIR"
@@ -306,9 +419,10 @@ elif [ "$BUILD_TYPE" == "ctest" ]; then
306419
add_python_pkg_lib_to_ld_path "nanovdb_editor" "NanoVDB Editor" "libpnanovdb*.so"
307420

308421
# Run ctest within the test build directory
422+
# Note: ctest doesn't need path sanitization as it doesn't search for libraries
309423
pushd "$BUILD_DIR" > /dev/null
310424
echo "Running ctest..."
311-
ctest --output-on-failure
425+
ctest --output-on-failure -LE compile_fail
312426
CTEST_EXIT_CODE=$?
313427
popd > /dev/null # Back to SOURCE_DIR
314428

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# -- Project information -----------------------------------------------------
1717

18-
project = "fVDB"
18+
project = "ƒVDB"
1919
copyright = "Contributors to the OpenVDB Project"
2020
author = "Contributors to the OpenVDB Project"
2121

@@ -76,6 +76,9 @@
7676
# relative to this directory. They are copied after the builtin static files,
7777
# so a file named "default.css" will overwrite the builtin "default.css".
7878
html_static_path = ["imgs"]
79+
html_css_files = [
80+
"css/custom.css",
81+
]
7982

8083

8184
# -- Custom hooks ------------------------------------------------------------

docs/imgs/css/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.wy-side-nav-search {
2+
background-color: #76b900;
3+
}

docs/index.rst

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Welcome to ƒVDB!
22
=================
33

4-
fVDB is a Python library of data structures and algorithms for building high-performance and large-domain
4+
ƒVDB is a Python library developed and maintained by NVIDIA, containing a collection of data structures and algorithms for building high-performance and large-domain
55
spatial applications using `NanoVDB <https://dl.acm.org/doi/abs/10.1145/3450623.3464653>`_ on the GPU
66
in `PyTorch <https://pytorch.org/>`_.
77
Applications of fVDB include 3D deep learning, computer graphics/vision, robotics, and scientific computing.
@@ -14,18 +14,18 @@ Applications of fVDB include 3D deep learning, computer graphics/vision, robotic
1414

1515
|
1616
17-
fVDB aims to be production ready with a focus on robustness, usability, and extensibility.
17+
ƒVDB aims to be production ready with a focus on robustness, usability, and extensibility.
1818
It is designed to be easily integrated into existing pipelines and workflows, and to support a
19-
wide range of use cases and applications. To this end, fVDB has a minimal set of dependencies and
19+
wide range of use cases and applications. To this end, ƒVDB has a minimal set of dependencies and
2020
is open source under the Apache 2.0 license as part of the `The Academy Software Foundation's
2121
OpenVDB project <https://www.openvdb.org>`_. Contributions and feedback from the community are welcome
22-
to fVDB's `GitHub repository <https://github.com/openvdb/fvdb-core>`_.
22+
to ƒVDB's `GitHub repository <https://github.com/openvdb/fvdb-core>`_.
2323

2424

2525
Features
2626
--------
2727

28-
fVDB provides the following key features:
28+
ƒVDB provides the following key features:
2929

3030
- A sparse volumetric grid data structure optimized for GPU memory efficiency and performance.
3131
- A highly optimized Gaussian splat data structure for representing radiance fields on the GPU.
@@ -35,40 +35,40 @@ fVDB provides the following key features:
3535
- Modular neural network components for building 3D deep learning models that scale to large input sizes.
3636
- Seamless integration with PyTorch for easy use in deep learning workflows.
3737

38-
The videos below show fVDB being used for large-scale 3D reconstruction, simulation, and interactive visualization.
38+
The videos below show ƒVDB being used for large-scale 3D reconstruction, simulation, and interactive visualization.
3939

4040
.. raw:: html
4141

4242
<p style="text-align: center; font-weight: bold; font-style: italic; text-decoration: underline; font-size: medium; text-decoration-skip-ink: none; margin-bottom: 0.5em;">
43-
fVDB being used to reconstruct radiance (25 million splats) fields and TSDF volumes (100 million voxels) from images and points</p>
43+
ƒVDB being used to reconstruct radiance (25 million splats) fields and TSDF volumes (100 million voxels) from images and points</p>
4444
<video autoplay loop controls muted width="90%" style="display: block; margin: 0 auto;">
4545
<source src="https://fvdb-data.s3.us-east-2.amazonaws.com/fvdb-reality-capture/spot_airport_480p.mp4" type="video/mp4" />
4646
</video>
4747

4848
<br>
4949
<p style="text-align: center; font-weight: bold; font-style: italic; text-decoration: underline; font-size: medium; text-decoration-skip-ink: none; margin-bottom: 0.5em;">
50-
fVDB being used to process a sparse SDF on a grid with 181 million voxels. Visualized in a browser.</p>
50+
ƒVDB being used to process a sparse SDF on a grid with 181 million voxels. Visualized in a browser.</p>
5151
<video autoplay loop controls muted width="90%" style="display: block; margin: 0 auto;">
5252
<source src="https://fvdb-data.s3.us-east-2.amazonaws.com/fvdb-reality-capture/crawler_480p.mp4" type="video/mp4" />
5353
</video>
5454

5555
|
5656
57-
About fVDB
57+
About ƒVDB
5858
--------------
5959

60-
fVDB was first developed by the `NVIDIA High-Fidelity Physics Research Group <https://research.nvidia.com/labs/prl/>`_
60+
ƒVDB was first developed by the `NVIDIA High-Fidelity Physics Research Group <https://research.nvidia.com/labs/prl/>`_
6161
within the `NVIDIA Spatial Intelligence Lab <https://research.nvidia.com/labs/sil/>`_, and continues to be
6262
developed with the OpenVDB community to suit the growing needs for a robust framework for
6363
spatial intelligence research and applications.
6464

6565

66-
fVDB Reality Capture Toolbox
66+
ƒVDB Reality Capture
6767
--------------------------------
6868

69-
In addition to the core fVDB library, we also provide the `fVDB Reality Capture <https://fvdb.ai/reality-capture>`_ toolbox,
70-
which is a collection of tools and utilities for 3D reconstruction and scene understanding using fVDB. Analogous to how `torchvision <https://pytorch.org/vision/stable/index.html>`_
71-
provides datasets, models, and transforms for computer vision tasks, `fVDB Reality Capture <https://fvdb.ai/reality-capture>`_ provides datasets, models, and
69+
In addition to the core ƒVDB library, we also provide the `ƒVDB Reality Capture <https://fvdb.ai/reality-capture>`_ toolbox,
70+
which is a collection of tools and utilities for 3D reconstruction and scene understanding using ƒVDB. Analogous to how `torchvision <https://pytorch.org/vision/stable/index.html>`_
71+
provides datasets, models, and transforms for computer vision tasks, `ƒVDB Reality Capture <https://fvdb.ai/reality-capture>`_ provides datasets, models, and
7272
algorithms for 3D reconstruction from sensor data.
7373

7474
.. toctree::
@@ -77,6 +77,12 @@ algorithms for 3D reconstruction from sensor data.
7777

7878
self
7979
installation
80+
GitHub Repository <https://github.com/openvdb/fvdb-core>
81+
82+
.. toctree::
83+
:caption: Applications
84+
85+
ƒVDB Reality Capture <https://fvdb.ai/reality-capture>
8086

8187
.. toctree::
8288
:maxdepth: 1

0 commit comments

Comments
 (0)