Skip to content

Update nvForest integration to use CUDA streams - #8601

Merged
rapids-bot[bot] merged 23 commits into
NVIDIA:mainfrom
chyunsu3:update_nvforest
Oct 19, 2026
Merged

rapids-bot[bot] merged 23 commits into
NVIDIA:mainfrom
chyunsu3:update_nvforest

Conversation

@chyunsu3

@chyunsu3 chyunsu3 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Updates cuML’s nvForest integration to use CUDA streams following rapidsai/nvforest#219.

  • Passes streams directly when exporting RandomForest and IsolationForest models to nvForest.
  • Updates C++ RF tests to reuse the same stream for model import and inference.
  • Forwards cuML’s static Treelite setting when building nvForest from source.

Companion to rapidsai/nvforest#219.

@chyunsu3
chyunsu3 requested a review from a team as a code owner September 10, 2026 02:03
@github-actions github-actions Bot added the ci label Sep 10, 2026
@chyunsu3 chyunsu3 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0c1189ac-45d1-4f00-95f4-b733a4910710

📥 Commits

Reviewing files that changed from the base of the PR and between 1a45939 and 213ce94.

📒 Files selected for processing (2)
  • ci/build_docs.sh
  • python/cuml/cuml/ensemble/isolation_forest.pyx

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Improved CUDA stream handling when exporting random forest and isolation forest models to NVForest for more reliable predictions and model operations.
  • Chores

    • Updated automated build and test workflows to support pull-request versions of NVForest Conda packages and wheels.
    • Refined dependency channel prioritization across C++, Python, documentation, notebook, and wheel workflows.
    • Updated the NVForest dependency source and refreshed copyright year ranges.

Changes

CI scripts retrieve pull-request nvforest Conda packages and wheels. Build and test flows consume them. nvforest prediction and model conversion now pass explicit CUDA streams. The nvforest dependency uses a pinned fork commit.

nvforest integration

Layer / File(s) Summary
Conda package selection and consumers
ci/use_conda_packages_from_prs.sh, ci/build_*.sh, ci/test_cpp.sh, ci/test_notebooks.sh, ci/test_python_common.sh
The Conda helper retrieves pull-request artifacts and configures channels for builds, documentation, and tests.
Wheel selection and consumers
ci/use_wheels_from_prs.sh, ci/build_wheel_*.sh, ci/test_wheel*.sh
The wheel helper retrieves pull-request wheels and writes pip constraints for wheel builds and tests.
Explicit CUDA stream usage
cpp/tests/sg/rf_test.cu, python/cuml/cuml/ensemble/*.pyx, cpp/cmake/thirdparty/get_nvforest.cmake
Prediction tests and Python model conversion pass explicit CUDA streams to nvforest. The dependency configuration selects a pinned fork commit.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Suggested reviewers: betatim

Merge Risk: ⚪ Minimal · up to 213ce

The updated CI artifact selection and CUDA stream integration have no demonstrated actionable defect. The change is ready for normal validation.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 14 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the main changes and implementation choices, but it does not link an issue with a GitHub closing keyword as required by the template. Add an issue reference using a GitHub closing keyword, such as Closes #1234. Include validation details if applicable.
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly describes the primary change: updating nvForest integration to use CUDA streams.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 14 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chyunsu3
chyunsu3 requested review from a team as code owners September 10, 2026 02:54
@chyunsu3
chyunsu3 requested a review from jcrist September 10, 2026 02:54
@github-actions github-actions Bot added Cython / Python Cython or Python issue CUDA/C++ labels Sep 10, 2026
@chyunsu3
chyunsu3 requested a review from a team as a code owner September 11, 2026 02:23
@github-actions github-actions Bot added the CMake label Sep 11, 2026
@chyunsu3 chyunsu3 changed the title [DO NOT MERGE] Test rapidsai/nvforest#219 Update nvForest usage according to rapidsai/nvforest#219 Oct 5, 2026
@chyunsu3
chyunsu3 marked this pull request as draft October 5, 2026 19:06
Comment thread ci/build_cpp.sh Outdated
export RAPIDS_PACKAGE_VERSION

# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source ./ci/use_conda_packages_from_prs.sh

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.

TODO: Remove this line after rapidsai/nvforest#219 is merged. Marking this PR as draft as the reminder.

@chyunsu3
chyunsu3 marked this pull request as ready for review October 14, 2026 03:42
@chyunsu3
chyunsu3 marked this pull request as draft October 14, 2026 21:56
@chyunsu3

Copy link
Copy Markdown
Contributor Author

/ok to test 81c38a2

@csadorf

csadorf commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test aa05bfa

@csadorf

csadorf commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

/ok to test f1fef78

@csadorf csadorf added the DO NOT MERGE Hold off on merging; see PR for details label Oct 16, 2026
@csadorf

csadorf commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Applied DO NOT MERGE to hold this until next week, when we can coordinate the landing with rapidsai/nvforest#219. Merging these independently could disrupt cuML CI. We should also remove the temporary PR-artifact plumbing and finalize the nvForest pin before merging.

@chyunsu3

Copy link
Copy Markdown
Contributor Author

/ok to test ba0f03b

rapids-bot Bot pushed a commit to rapidsai/nvforest that referenced this pull request Oct 19, 2026
**Companion PR: NVIDIA/cuml#8601. To minimize the disruption in the cuML CI, we should merge this PR together with NVIDIA/cuml#8601 .

* Remove the use of `raft::handle_t` and `nvforest::handle_t` and use CUDA streams directly.
* Create `predict()` overloads that takes in either a single CUDA stream or a pool of multiple CUDA streams.
* Use `cuda::buffer` instead of `rmm::device_buffer`. Since `cuda::buffer` requires NVCC to build, we need to use PIMPL with type erasure.
* Update all C++ tests.
* Update the Python layer. The `handle` parameter is now deprecated and its use will trigger a `FutureWarning`. Users are directed to use `stream` instead.
* Remove `cpp/cmake/thirdparty/get_rmm.cmake`. For now, we retain `cpp/cmake/thirdparty/get_raft.cmake`, since we need to wait one release cycle until we can remove the deprecated `handle` parameter.
* Add test coverage for using stream with wrong device.

After this PR, #193 will update `dependencies.yaml` to remove the RMM dependency and update the docs.

History
* This PR is part of #193
* This is a re-submission of #195 (which was previously reverted to unblock the cuML CI).
* #195 originally targeted 26.10, whereas this PR targets 26.12.

Authors:
  - Philip Hyunsu Cho (https://github.com/chyunsu3)
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Simon Adorf (https://github.com/csadorf)

URL: #219
@csadorf

csadorf commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

/ok to test 64ca6e3

@csadorf
csadorf marked this pull request as ready for review October 19, 2026 20:20
@csadorf
csadorf removed request for a team and KyleFromNVIDIA October 19, 2026 20:20
@csadorf csadorf removed the DO NOT MERGE Hold off on merging; see PR for details label Oct 19, 2026
@csadorf csadorf changed the title Update nvForest usage according to rapidsai/nvforest#219 Update nvForest integration to use CUDA streams Oct 19, 2026
@jcrist

jcrist commented Oct 19, 2026

Copy link
Copy Markdown
Member

/merge

@rapids-bot
rapids-bot Bot merged commit 210dff7 into NVIDIA:main Oct 19, 2026
168 of 171 checks passed
@chyunsu3
chyunsu3 deleted the update_nvforest branch October 19, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CMake CUDA/C++ Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants