Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
522f654
Initial fvdb-core recipe
swahtz Nov 25, 2025
93632a6
Fix some run requirements and abouts
swahtz Nov 25, 2025
a1b16f8
Fix up linting issues
swahtz Nov 25, 2025
0b092ba
Fix syntax
swahtz Nov 25, 2025
ac0e31a
Fix a linting warning
swahtz Nov 25, 2025
52933ae
Fix typo and skip cpu builds
swahtz Nov 25, 2025
8cff108
Fix CPU builds, referencing torchvision
swahtz Nov 25, 2025
435544e
Fix syntax issues
swahtz Nov 25, 2025
3934796
Attempt to fix linux_64 build
swahtz Nov 25, 2025
f4dff09
Attempt to fix linux_64 build
swahtz Nov 25, 2025
a01c27e
Update CUDA 12.6 -> 12.9
swahtz Nov 25, 2025
400ed39
Fix cudnn run requirements
swahtz Nov 25, 2025
31b5b82
Revert "Update CUDA 12.6 -> 12.9"
swahtz Nov 25, 2025
d04b317
Merge branch 'conda-forge:main' into fvdb-recipe
swahtz Dec 3, 2025
6260d82
Unpin pytorch version
swahtz Dec 11, 2025
613bbd5
Simplify skip logic
swahtz Jan 22, 2026
0392223
Merge branch 'main' into fvdb-recipe
swahtz Jan 22, 2026
b600f52
Update recipes/fvdb-core/meta.yaml
swahtz Jan 22, 2026
57243f5
Update recipes/fvdb-core/meta.yaml
swahtz Jan 22, 2026
a162aeb
Update recipes/fvdb-core/meta.yaml
swahtz Jan 22, 2026
472cd21
Update recipes/fvdb-core/meta.yaml
swahtz Jan 22, 2026
6f2f819
remove ignore_run_exports
swahtz Jan 22, 2026
b366c1c
Update recipes/fvdb-core/meta.yaml
swahtz Jan 22, 2026
4df9512
extra wildcard in cuda specifier
swahtz Jan 23, 2026
89dc94a
remove unneeded cuda_compiler_version guards
swahtz Jan 23, 2026
273557a
fix run section torch specification
swahtz Jan 23, 2026
8f29953
Added build.sh, setup TORCH_CUDA_ARCH_LIST env
swahtz Jan 23, 2026
b956de0
Update recipes/fvdb-core/meta.yaml
swahtz Feb 13, 2026
2ebb4d3
Update recipes/fvdb-core/meta.yaml
swahtz Feb 13, 2026
f871fd9
Update recipes/fvdb-core/meta.yaml
swahtz Feb 13, 2026
ee9badb
Update recipes/fvdb-core/meta.yaml
swahtz Feb 13, 2026
d221f83
Update recipes/fvdb-core/meta.yaml
swahtz Feb 13, 2026
40757ee
Merge branch 'main' into fvdb-recipe
swahtz Feb 13, 2026
0ac3ad8
Fix linting issue
swahtz Feb 13, 2026
c09240c
revert to more complete CUDA arch list compatible with CUDA >=12.8
swahtz Feb 13, 2026
5bb4a7e
Ninja cmake generator added to build script
swahtz Feb 13, 2026
faee720
Add 'skbuild.ninja.make-fallback=false' to make sure we fail early wh…
swahtz Feb 13, 2026
115a58a
Skip all except python 3.12 build to work around build timeout
swahtz Feb 13, 2026
293053d
Add tests script following cupy example for not running if GPU is not…
swahtz Feb 13, 2026
6c2dca5
Merge branch 'main' into fvdb-recipe
swahtz Feb 13, 2026
416d5a5
add gitpython tests dependency
swahtz Feb 13, 2026
843b148
fix git requirement
swahtz Feb 14, 2026
be89090
addressing notes
swahtz Feb 15, 2026
78da6b5
Merge branch 'main' into fvdb-recipe
swahtz Feb 16, 2026
7424821
ad libcudnn-dev to reqs/host
swahtz Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions recipes/fvdb-core/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash

setup_parallel_build_jobs() {
# Calculate the optimal number of parallel build jobs based on available RAM
RAM_GB=$(free -g | awk '/^Mem:/{print $7}')
if [ -z "$RAM_GB" ]; then
echo "Error: Unable to determine available RAM"
exit 1
fi
JOB_RAM_GB=3

# Get number of processors
NPROC=$(nproc)

# count the number of ';' in the TORCH_CUDA_ARCH_LIST
NUM_ARCH=$(echo "$TORCH_CUDA_ARCH_LIST" | tr ';' '\n' | wc -l)
if [ "$NUM_ARCH" -lt 1 ]; then
NUM_ARCH=1
fi
NVCC_THREADS=$NUM_ARCH

# Check if we have enough RAM for even one job with full NVCC_THREADS
# Requirement: JOB_RAM_GB * NVCC_THREADS
MIN_RAM_REQUIRED=$((JOB_RAM_GB * NVCC_THREADS))

if [ "$RAM_GB" -lt "$MIN_RAM_REQUIRED" ]; then
NVCC_THREADS=1
fi

# Limit NVCC_THREADS to NPROC to ensure we don't oversubscribe
if [ "$NVCC_THREADS" -gt "$NPROC" ]; then
NVCC_THREADS=$NPROC
fi

# Determine max jobs based on CPU:
# We want CMAKE_BUILD_PARALLEL_LEVEL * NVCC_THREADS <= NPROC
MAX_JOBS_CPU=$((NPROC / NVCC_THREADS))

# Determine max jobs based on RAM:
# Assume each job requires JOB_RAM_GB * NVCC_THREADS
MAX_JOBS_RAM=$((RAM_GB / (JOB_RAM_GB * NVCC_THREADS)))

# Take the minimum
PARALLEL_JOBS=$((MAX_JOBS_CPU < MAX_JOBS_RAM ? MAX_JOBS_CPU : MAX_JOBS_RAM))

# Ensure at least 1 job
if [ "$PARALLEL_JOBS" -lt 1 ]; then
PARALLEL_JOBS=1
fi

# if CMAKE_BUILD_PARALLEL_LEVEL is set, use that
if [ -n "$CMAKE_BUILD_PARALLEL_LEVEL" ]; then
echo "Using CMAKE_BUILD_PARALLEL_LEVEL=$CMAKE_BUILD_PARALLEL_LEVEL"
else

CMAKE_BUILD_PARALLEL_LEVEL=$PARALLEL_JOBS

echo "Setting nvcc --threads to $NVCC_THREADS based on the number of CUDA architectures ($NUM_ARCH)"
echo "Setting CMAKE_BUILD_PARALLEL_LEVEL to $CMAKE_BUILD_PARALLEL_LEVEL"
echo " Constraint: Total Threads ($((CMAKE_BUILD_PARALLEL_LEVEL * NVCC_THREADS))) <= NPROC ($NPROC)"
echo " Constraint: Estimated RAM ($((CMAKE_BUILD_PARALLEL_LEVEL * NVCC_THREADS * JOB_RAM_GB))) GB <= Available RAM ($RAM_GB GB)"

export CMAKE_BUILD_PARALLEL_LEVEL
export NVCC_THREADS
fi
}


setup_parallel_build_jobs
export CMAKE_GENERATOR=Ninja
# GCC 14 false positive: -Wstringop-overflow in NanoVDB headers with deep template inlining at -O3
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118817
export CXXFLAGS="${CXXFLAGS} -Wno-error=stringop-overflow"
$PYTHON -m pip install \
--no-deps \
--no-build-isolation \
-vv \
-C 'skbuild.ninja.make-fallback=false' \
.
88 changes: 88 additions & 0 deletions recipes/fvdb-core/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{% set name = "fvdb-core" %}
{% set version = "0.3.0" %}
{% set torch_proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/fvdb_core-{{ version }}.tar.gz
sha256: f6ec0d5e6a2b601632720ed0be8aa7c8ba6f2d9bd63fac477cef2cfd088b5f16

build:
skip: true # [cuda_compiler_version == "None" or win or osx or py!=312]
number: 0
script_env:
- TORCH_CUDA_ARCH_LIST=7.5;8.0;9.0;10.0;12.0+PTX


requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- {{ stdlib('c') }}
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }}
- cuda-version {{ cuda_compiler_version }}
- cuda-command-line-tools

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we use from here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe just nvcc, I thought this was the appropriate way to pull in the CUDA compiler. I had found at some point that {{ compiler('cuda') }} wasn't enough

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah {{ compiler('cuda') }} should be enough for nvcc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have filed this as issue: conda-forge/fvdb-core-feedstock#2

- cmake >=3.25
- ninja
- pkg-config
- git
- procps-ng # provides 'free'
- coreutils # provides 'nproc', 'awk', etc.
host:
- python
- scikit-build-core
- pip
- pytorch
- pytorch =*=*{{ torch_proc_type }}*
- numpy
- pybind11 >=2.13
- gitpython
Comment thread
jakirkham marked this conversation as resolved.
- cuda-version {{ cuda_compiler_version }}
Comment thread
swahtz marked this conversation as resolved.
- cuda-cudart-dev
- cuda-nvrtc-dev
- cuda-nvtx-dev

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this isn't getting detected by CMake

  -- CPM: Adding package nvtx3@3.1.0 (v3.1.0-c-cpp)
  -- get_nvtx.cmake: Forced nvtx3_dir to CACHE: /home/conda/staged-recipes/build_artifacts/fvdb-core_1771020205707/work/build/cp312-cp312-linux_x86_64-Release/_deps/nvtx3-src/include (from CPM source)

So we may need to adjust the CMake options so it is found

Alternatively we can use the nvtx-c package where we have confirmed CMake detection works

If we need to push more changes here, we can include one of these fixes. Otherwise it is ok to handle in the feedstock

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer to handle it in the feedstock just because we're gearing up for a new release in early March where I can make these build changes (as well as some of the other changes to support the conda-forge build better) and not have to patch the old 0.3.0 release.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have filed this as issue: conda-forge/fvdb-core-feedstock#3

- libcublas-dev
- libcudnn-dev
- libcusolver-dev
- libcusparse-dev
- libpng
- zlib
run:
- python
- pytorch
- pytorch =*=*{{ torch_proc_type }}*
- {{ pin_compatible('numpy') }}
- cuda-version {{ cuda_compiler_version }}
- gitpython
- git
- parameterized

@jameslamb jameslamb Feb 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anticipating more comments for the cudnn question, could we use a thread?

I see the following in the CMake configure logs:

-- USE_CUDNN is set to 0. Compiling without cuDNN support

But then later see cudnn_frontend pulled in via CPM:

-- CPM: Adding package cudnn_frontend@1.3.0 (v1.3.0)
-- Populating cudnn_frontend
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/conda/staged-recipes/build_artifacts/fvdb-core_1771202868458/work/build/cp312-cp312-linux_x86_64-Release/_deps/cudnn_frontend-subbuild
[1/9] Creating directories for 'cudnn_frontend-populate'
[1/9] Performing download step (git clone) for 'cudnn_frontend-populate'
Cloning into 'cudnn_frontend-src'...
HEAD is now at 1b0b5ea cudnn frontend v1.3 release notes. (#72)
[2/9] Performing update step for 'cudnn_frontend-populate'
-- Already at requested tag: v1.3.0
[3/9] No patch step for 'cudnn_frontend-populate'
[5/9] No configure step for 'cudnn_frontend-populate'
[6/9] No build step for 'cudnn_frontend-populate'
[7/9] No install step for 'cudnn_frontend-populate'
[8/9] No test step for 'cudnn_frontend-populate'
[9/9] Completed 'cudnn_frontend-populate'

Either way, could the libcudnn.so dependency be coming through transitively from libtorch.so?

conda create \
  --name torch-test \
  --yes \
    'libtorch 2.9.1 cuda129_mkl_hf3b6726_305'

source activate torch-test

find ${CONDA_PREFIX} -name 'libtorch.so*' -exec ldd {} \+
...
libcudnn.so.9 => /home/jlamb/miniforge3/envs/torch-test/lib/././libcudnn.so.9 (0x000078d7fe200000)
...

And if it is, shouldn't the pytorch =*=*{{ torch_proc_type }}* dependency in run: be enough to pull in libtorch and therefore libcudnn? 🤔

I will try to look into this soon.

@swahtz swahtz Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought the same @jameslamb

cudnn_frontend is header-only afaik. But I do see that we have dynamically linked libcudnn directly:

❯ readelf -d libfvdb.so | grep NEEDED
0x0000000000000001 (NEEDED)             Shared library: [libtorch.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc10.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc10_cuda.so]
 0x0000000000000001 (NEEDED)             Shared library: [libcudnn.so.9]
 0x0000000000000001 (NEEDED)             Shared library: [libtorch_cpu.so]
 0x0000000000000001 (NEEDED)             Shared library: [libtorch_cuda.so]
 0x0000000000000001 (NEEDED)             Shared library: [libcudart.so.12]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]

Should I add libcudnn to reqs/run as the error message implies or should I add libcudnn-dev to reqs/host like the other CUDA libraries?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the requirement to the run requirements and now we're back to passing checks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok great! I think it's fine for now to just take on the dependency and to investigate removing it later in the feedstock.

By the way, if you want (no pressure!) I'd be happy to join as a maintainer for this recipe if you'd like another set of hands to keep things moving.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be amazing, thank you! Someone who can lend a hand with knowledge in this domain would be fantastic

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok sure, thanks! You could add me in the recipe-maintainers: section in the recipe here, or we can do it later in the feedstock, following https://conda-forge.org/docs/maintainer/updating_pkgs/#updating-the-maintainer-list

Either is fine.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed an issue to follow up on cuDNN: conda-forge/fvdb-core-feedstock#4

test:
commands:
- pip check
- python run_test.py
source_files:
- tests/
requires:
- pip
- pytest
- parameterized
- git

about:
home: https://www.openvdb.org/
license: Apache-2.0
license_family: Apache
license_file: LICENSE
summary: "A deep learning framework for sparse, large-scale, high-performance spatial intelligence"
doc_url: https://fvdb.ai/
dev_url: https://github.com/openvdb/fvdb-core

extra:
recipe-maintainers:
- swahtz
32 changes: 32 additions & 0 deletions recipes/fvdb-core/run_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sys

# Check for fvdb (without importing)
import pkgutil
pkgutil.find_loader("fvdb")

# Try to import fvdb
try:
import fvdb
except ImportError:
print("Failed to import fvdb. Exiting without running tests.")
sys.exit(0)

print(f"fvdb {fvdb.__version__} imported successfully")

# Check for GPU availability
import torch

if not torch.cuda.is_available():
print("No CUDA GPU available. Exiting without running fvdb's tests.")
sys.exit(0)

print(f"CUDA is available: {torch.cuda.get_device_name(0)}")

# Run fvdb's test suite
# Ignore tests with unavailable optional dependencies (OpenImageIO, point_cloud_utils, torch_scatter)
import pytest
sys.exit(pytest.main([
"tests/unit", "-v", "--tb=short",
"--ignore=tests/unit/test_gsplat.py",
"--ignore=tests/unit/test_jagged_tensor.py",
]))