Skip to content

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

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

[FEA] Multi-node Out of Core Streaming KMeans API#2066
tarang-jain wants to merge 224 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 test defb785

Comment thread conda/recipes/libcuvs/recipe.yaml Outdated
- nccl ${{ nccl_version }}
# ucx/ucxx are linked by the multi-GPU (MG) tests
- libucxx ${{ ucxx_version }}
- ucx

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.

These are needed at build time, right? We also need to list these under the cached host env, under line 74.

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.

We also need to list these under the cached host env, under line 74.

@divyegala this is the place from where I removed it, right? Should I add it again?

@tarang-jain

Copy link
Copy Markdown
Contributor Author

/ok to test 8dd17f3

@bdice bdice 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.

Ah, this is an entirely new dependency on ucxx. We have several other tasks to handle.

https://github.com/NVIDIA/cuvs/blob/main/ci/release/update-version.sh needs changes like raft has.

Also reference how RAFT uses UCXX_VERSION and UCXX_BRANCH throughout the repo, we'll need to replicate all that infrastructure.

@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
FORK ${RAFT_FORK}
PINNED_TAG ${RAFT_PINNED_TAG}
ENABLE_MNMG_DEPENDENCIES OFF
ENABLE_MNMG_DEPENDENCIES ${BUILD_MG_ALGOS}

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.

Suggested change
ENABLE_MNMG_DEPENDENCIES ${BUILD_MG_ALGOS}
ENABLE_MNMG_DEPENDENCIES ${BUILD_MG_ALGOS}

@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

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