Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
507a763
cuml#8394 squashed
chyunsu3 Aug 11, 2026
74119ad
Update Dask RF to use the new distributed algo
chyunsu3 Aug 11, 2026
9f88d21
Merge branch 'main' into distributed_rf_dask
chyunsu3 Aug 11, 2026
966fd32
Merge branch 'main' into distributed_rf_dask
chyunsu3 Aug 11, 2026
c041409
Merge remote-tracking branch 'origin/main' into distributed_rf_dask
chyunsu3 Aug 14, 2026
7891881
Deprecate n_streams, ignore_empty_partitions, broadcast_data
chyunsu3 Aug 14, 2026
7dfde41
Move comms.init inside try block
chyunsu3 Aug 14, 2026
634aafe
Update pytests
chyunsu3 Aug 14, 2026
89b8ea0
Fix warnings
chyunsu3 Aug 14, 2026
62276dd
Use 64-bit int to store global row count
chyunsu3 Aug 14, 2026
ca9e031
Ensure that at least one future exists in fit()
chyunsu3 Aug 14, 2026
628e25e
Synchronize docstrings
chyunsu3 Aug 14, 2026
799b7c8
Merge remote-tracking branch 'origin/main' into distributed_rf_dask
chyunsu3 Aug 19, 2026
8f2b553
Add unit test test_rf_regression_nan_on_one_worker
chyunsu3 Aug 19, 2026
41f0df4
Validate inputs before fit()
chyunsu3 Aug 19, 2026
6cba38d
Coerce n_streams to stream pool size
chyunsu3 Aug 19, 2026
96cb72b
Move cuml_rf_allreduce_validation_status() to ML::detail
chyunsu3 Aug 19, 2026
b60df9d
Compute and distribute global class weights
chyunsu3 Aug 20, 2026
837182f
Fix oob_scores_ + oob_predictions_
chyunsu3 Aug 20, 2026
2a18814
Merge remote-tracking branch 'origin/main' into distributed_rf_dask
chyunsu3 Aug 20, 2026
1673b38
Merge branch 'main' into distributed_rf_dask
chyunsu3 Aug 20, 2026
7d18f27
Set self.rfs after wait_and_raise_from_futures() succeeds
chyunsu3 Aug 20, 2026
5502d38
Leave out oob_decision_function_ for now
chyunsu3 Aug 20, 2026
b4e5260
Restore support for cuPy arrays
chyunsu3 Aug 21, 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
41 changes: 41 additions & 0 deletions cpp/include/cuml/ensemble/randomforest_mg_utils.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#include <raft/core/comms.hpp>
#include <raft/core/handle.hpp>
#include <raft/core/resource/comms.hpp>
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/util/cudart_utils.hpp>

#include <cstddef>

namespace ML::detail {

inline void cuml_rf_allreduce_validation_status(const raft::handle_t& handle,
const int* local_status,
int* global_status)
Comment on lines +18 to +20

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'm putting this in a separate header. If this function had gone into cuml/ensemble/randomforest.hpp, we'd need to include raft/core/handle.hpp and increate the compilation time.

{
auto const& comm = raft::resource::get_comms(handle);
cudaStream_t stream = raft::resource::get_cuda_stream(handle);
comm.allreduce(local_status, global_status, 1, raft::comms::op_t::MAX, stream);
RAFT_EXPECTS(comm.sync_stream(stream) == raft::comms::status_t::SUCCESS,
"Input validation status all-reduce failed");
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

inline void cuml_rf_allreduce_oob_stats(const raft::handle_t& handle,
const double* local_stats,
double* global_stats,
std::size_t count)
{
auto const& comm = raft::resource::get_comms(handle);
cudaStream_t stream = raft::resource::get_cuda_stream(handle);
comm.allreduce(local_stats, global_stats, count, raft::comms::op_t::SUM, stream);
RAFT_EXPECTS(comm.sync_stream(stream) == raft::comms::status_t::SUCCESS,
"OOB statistics all-reduce failed");
}

} // namespace ML::detail
10 changes: 6 additions & 4 deletions cpp/src/randomforest/randomforest.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,12 @@ class RandomForest {
// Distributed tree builders issue collectives independently, so train them serially until
// the forest-level scheduler can impose a global collective order across concurrent trees.
if (distributed) { n_streams = 1; }
ASSERT(static_cast<std::size_t>(n_streams) <= handle.get_stream_pool_size(),
"effective RF n_streams (=%d) should be <= raft::handle_t.n_streams (=%lu)",
n_streams,
handle.get_stream_pool_size());
auto stream_pool_size = handle.get_stream_pool_size();
if (static_cast<std::size_t>(n_streams) > stream_pool_size) {
CUML_LOG_WARN("Resizing n_streams to fit the available stream pool size (%lu)",
stream_pool_size);
n_streams = ML::narrow_cast<int>(stream_pool_size);
}

auto quantile_result = DT::computeQuantiles(handle,
input,
Expand Down
Loading
Loading