Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ fm = nvforest.load_model("/path/to/xgboost_model.ubj", device="gpu",
pred = fm.predict(X)
```

To run GPU work on a caller-managed CUDA stream, pass a `cuda.core.Stream`
created on the model's device. If omitted, nvForest creates and retains a stream
for the model:

```python
from cuda.core import Device

device = Device(0)
device.set_current()
stream = device.create_stream()

fm = nvforest.load_model(
"/path/to/xgboost_model.ubj",
device="gpu",
device_id=0,
stream=stream,
)
pred = fm.predict(X)
```

Load a scikit-learn random forest model and get class probabilities:

```python
Expand Down
4 changes: 1 addition & 3 deletions ci/build_wheel_libnvforest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand Down Expand Up @@ -29,7 +29,6 @@ rapids-pip-retry install \
export PIP_NO_BUILD_ISOLATION=0

EXCLUDE_ARGS=(
--exclude "libraft.so"
--exclude "libcublas.so.*"
--exclude "libcublasLt.so.*"
--exclude "libcufft.so.*"
Expand All @@ -38,7 +37,6 @@ EXCLUDE_ARGS=(
--exclude "libcusparse.so.*"
--exclude "libnvJitLink.so.*"
--exclude "librapids_logger.so"
--exclude "librmm.so"
)

export SKBUILD_CMAKE_ARGS="-DDISABLE_DEPRECATION_WARNINGS=ON"
Expand Down
2 changes: 0 additions & 2 deletions ci/build_wheel_nvforest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ echo "libnvforest-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBNVFOREST_WHEELH

EXCLUDE_ARGS=(
--exclude "libnvforest.so"
--exclude "libraft.so"
--exclude "libcublas.so.*"
--exclude "libcublasLt.so.*"
--exclude "libcufft.so.*"
Expand All @@ -30,7 +29,6 @@ EXCLUDE_ARGS=(
--exclude "libcusparse.so.*"
--exclude "libnvJitLink.so.*"
--exclude "librapids_logger.so"
--exclude "librmm.so"
--exclude "libtreelite.so"
)

Expand Down
5 changes: 0 additions & 5 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ DEPENDENCIES=(
nvforest
libnvforest
libnvforest-tests
libraft
libraft-headers
librmm
pylibraft
rmm
)
for DEP in "${DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
Expand Down
4 changes: 1 addition & 3 deletions conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- click
- cmake>=4.0
- cuda-bindings>=12.9.2,<13.0
- cuda-core>=1.0.0,<2.0.0
- cuda-cudart-dev
- cuda-nvcc
- cuda-profiler-api
Expand All @@ -21,15 +22,12 @@ dependencies:
- doxygen
- gcc_linux-aarch64=14.*
- graphviz
- libraft==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- numpy>=2.0,<3.0a0
- numpydoc
- packaging
- pandas
- pre-commit
- pylibraft==26.10.*,>=0.0.0a0
- pytest
- pytest-cov
- pytest-xdist
Expand Down
4 changes: 1 addition & 3 deletions conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- click
- cmake>=4.0
- cuda-bindings>=12.9.2,<13.0
- cuda-core>=1.0.0,<2.0.0
- cuda-cudart-dev
- cuda-nvcc
- cuda-profiler-api
Expand All @@ -21,15 +22,12 @@ dependencies:
- doxygen
- gcc_linux-64=14.*
- graphviz
- libraft==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- numpy>=2.0,<3.0a0
- numpydoc
- packaging
- pandas
- pre-commit
- pylibraft==26.10.*,>=0.0.0a0
- pytest
- pytest-cov
- pytest-xdist
Expand Down
4 changes: 1 addition & 3 deletions conda/environments/all_cuda-133_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- click
- cmake>=4.0
- cuda-bindings>=13.0.1,<14.0
- cuda-core>=1.0.0,<2.0.0
- cuda-cudart-dev
- cuda-nvcc
- cuda-profiler-api
Expand All @@ -21,15 +22,12 @@ dependencies:
- doxygen
- gcc_linux-aarch64=14.*
- graphviz
- libraft==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- numpy>=2.0,<3.0a0
- numpydoc
- packaging
- pandas
- pre-commit
- pylibraft==26.10.*,>=0.0.0a0
- pytest
- pytest-cov
- pytest-xdist
Expand Down
4 changes: 1 addition & 3 deletions conda/environments/all_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- click
- cmake>=4.0
- cuda-bindings>=13.0.1,<14.0
- cuda-core>=1.0.0,<2.0.0
- cuda-cudart-dev
- cuda-nvcc
- cuda-profiler-api
Expand All @@ -21,15 +22,12 @@ dependencies:
- doxygen
- gcc_linux-64=14.*
- graphviz
- libraft==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- numpy>=2.0,<3.0a0
- numpydoc
- packaging
- pandas
- pre-commit
- pylibraft==26.10.*,>=0.0.0a0
- pytest
- pytest-cov
- pytest-xdist
Expand Down
2 changes: 0 additions & 2 deletions conda/environments/clang_tidy_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ dependencies:
- cuda-version=12.9
- cxx-compiler
- gcc_linux-64=14.*
- libraft-headers==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- llvm-openmp==15.0.7
- ninja
- sysroot_linux-64==2.28
Expand Down
2 changes: 0 additions & 2 deletions conda/environments/clang_tidy_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ dependencies:
- cuda-version=13.3
- cxx-compiler
- gcc_linux-64=14.*
- libraft-headers==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- llvm-openmp==15.0.7
- ninja
- sysroot_linux-64==2.28
Expand Down
2 changes: 0 additions & 2 deletions conda/environments/cpp_all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dependencies:
- cuda-version=12.9
- cxx-compiler
- gcc_linux-64=14.*
- libraft-headers==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- sysroot_linux-64==2.28
name: cpp_all_cuda-129_arch-x86_64
2 changes: 0 additions & 2 deletions conda/environments/cpp_all_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dependencies:
- cuda-version=13.3
- cxx-compiler
- gcc_linux-64=14.*
- libraft-headers==26.10.*,>=0.0.0a0
- librmm==26.10.*,>=0.0.0a0
- ninja
- sysroot_linux-64==2.28
name: cpp_all_cuda-133_arch-x86_64
6 changes: 0 additions & 6 deletions conda/recipes/libnvforest/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ cache:
- ${{ stdlib("c") }}
host:
- cuda-version =${{ cuda_version }}
- libraft-headers =${{ minor_version }}
- librmm =${{ minor_version }}
- rapids-logger =0.3
- treelite ${{ treelite_version }}
- cuda-cudart-dev
Expand All @@ -100,19 +98,16 @@ outputs:
host:
- cuda-version =${{ cuda_version }}
- rapids-logger =0.3
- librmm =${{ minor_version }}
- treelite ${{ treelite_version }}
- cuda-cudart-dev
run:
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
- librmm =${{ minor_version }}
- rapids-logger =0.3
- treelite ${{ treelite_version }}
ignore_run_exports:
by_name:
- cuda-cudart
- cuda-version
- librmm
- libcusolver
about:
homepage: ${{ load_from_file("python/libnvforest/pyproject.toml").project.urls.Homepage }}
Expand Down Expand Up @@ -143,7 +138,6 @@ outputs:
by_name:
- cuda-cudart
- cuda-version
- librmm
about:
homepage: ${{ load_from_file("python/libnvforest/pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("python/libnvforest/pyproject.toml").project.license }}
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/nvforest/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ requirements:
- cython >=3.0.0
- libnvforest =${{ version }}
- pip
- pylibraft =${{ minor_version }}
- cuda-core >=1.0.0,<2.0.0
- python =${{ py_abi_min }}
- python-abi3 ${{ py_abi_min }}.*
- rapids-build-backend >=0.4.0,<0.5.0.dev0
Expand All @@ -96,7 +96,7 @@ requirements:
- libnvforest =${{ version }}
- numpy >=2.0,<3.0a0
- scikit-learn >=1.4
- pylibraft =${{ minor_version }}
- cuda-core >=1.0.0,<2.0.0
- python
- treelite ${{ treelite_version }}
- cuda-cudart
Expand Down
9 changes: 3 additions & 6 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ endif()

# CCCL before RMM, and RMM before RAFT
include(cmake/thirdparty/get_cccl.cmake)
if(NVFOREST_ENABLE_GPU)
include(cmake/thirdparty/get_rmm.cmake)
include(cmake/thirdparty/get_raft.cmake)
endif()
include(cmake/thirdparty/get_treelite.cmake)

if(BUILD_NVFOREST_TESTS)
Expand Down Expand Up @@ -252,7 +248,8 @@ if(NVFOREST_ENABLE_GPU)
src/infer8.cu
src/infer9.cu
src/infer10.cu
src/infer11.cu)
src/infer11.cu
src/detail/device_buffer.cu)
endif()
target_sources(
${NVFOREST_CPP_TARGET}
Expand Down Expand Up @@ -312,7 +309,7 @@ elseif(NVFOREST_EXPORT_TREELITE_LINKAGE)
endif()

if(NVFOREST_ENABLE_GPU)
list(APPEND _nvforest_cpp_public_libs rmm::rmm raft::raft CUDA::cudart_static)
list(APPEND _nvforest_cpp_public_libs CUDA::cudart_static)
endif()

# These are always private:
Expand Down
78 changes: 0 additions & 78 deletions cpp/cmake/thirdparty/get_raft.cmake

This file was deleted.

13 changes: 0 additions & 13 deletions cpp/cmake/thirdparty/get_rmm.cmake

This file was deleted.

Loading
Loading