Skip to content

[FEA] Multi-node Out of Core Streaming KMeans API#2066

Open
tarang-jain wants to merge 227 commits into
NVIDIA:mainfrom
tarang-jain:mnmg-streaming
Open

[FEA] Multi-node Out of Core Streaming KMeans API#2066
tarang-jain wants to merge 227 commits into
NVIDIA:mainfrom
tarang-jain:mnmg-streaming

Conversation

@tarang-jain

@tarang-jain tarang-jain commented May 7, 2026

Copy link
Copy Markdown
Contributor

Merge after #2015 and #2017

Allows a stream of input matrices per worker, that are further batched using the streaming_batch_size parameter. Reasoning: We should be able to supply dask partitions (on host) directly without having to concatenate them into one consolidated matrix.

As a part of this PR, we also unify the multi-GPU implementations into one (earlier the out of core implementation was separate).
Tests: We get rid of the separate out of core test file. The single MG testing unit is taking care of both out of core and on device matrices.

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to tesst ccd5e43

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test ccd5e43

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test 21864d2

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test 4da8077

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test a0edd32

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test c8db7ff

Comment thread cpp/cmake/thirdparty/get_raft.cmake Outdated
@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test fe98618

Comment thread cpp/tests/CMakeLists.txt Outdated
if(Python_FOUND)
include(${rapids-cmake-dir}/cython-core/find_prefix_paths.cmake)
rapids_cython_find_prefix_paths("${Python_EXECUTABLE}" _cuvs_wheel_prefix_paths)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don’t fully understand what this code path is aiming to do, but conda doesn’t use lib64 paths iirc. Normally I would assume this is used in wheels, but we don’t build C++ tests for wheels. What’s going on 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 had done that to ensure that if those dependencies are coming from pip, they are found. Because find_package was failing if I get pylibraft from pip. I agree that we no longer do this in our conda builds, so it is not needed

Comment thread cpp/tests/CMakeLists.txt
Comment on lines +330 to +331
NAME CLUSTER_KMEANS_MG_TEST
PATH cluster/kmeans_mg.cu

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please mark all multi-GPU tests as SERIAL. You probably don’t want to run two 2-GPU tests concurrently on a 4-GPU system. It just gets messy. We recently discussed this topic for cudf and that was the right choice. rapidsai/cudf#23188

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test 07b5a39

@viclafargue viclafargue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The SNMG batched KMeans C/Python API was merged before and unfortunately now calls the single-GPU path after this PR. We should fix this.

@tarang-jain tarang-jain requested a review from a team as a code owner July 10, 2026 16:32
@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test 78a4278

@viclafargue viclafargue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot!

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change feature request New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

8 participants