Skip to content

Enable build_sorted_mst with data on host memory #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: branch-25.08
Choose a base branch
from

Conversation

jinsolp
Copy link
Contributor

@jinsolp jinsolp commented Jun 10, 2025

Connecting knn graph requires the entire data to be on device memory to use cuvs::sparse::neighbors::cross_component_nn.

This PR enables connecting knn graph with data on host by randomly choosing edges between components. Thus, it ends up selecting n_components-1 number of edges and adds that to the msf to make an mst.

@jinsolp jinsolp requested a review from a team as a code owner June 10, 2025 17:58
@jinsolp jinsolp self-assigned this Jun 10, 2025
@github-actions github-actions bot added the cpp label Jun 10, 2025
@jinsolp jinsolp added feature request New feature or request non-breaking Introduces a non-breaking change and removed cpp labels Jun 10, 2025
Comment on lines 201 to 205
cuvs::distance::pairwise_distance(handle,
raft::make_const_mdspan(data_u.view()),
raft::make_const_mdspan(data_v.view()),
pairwise_dist.view(),
metric);
Copy link
Member

Choose a reason for hiding this comment

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

Based on your answer to my previous question, if using omp, I would also create new handles with streams picked from a pool for this call to saturate the GPU with concurrency (pairwise distance of 1 row at a time on the GPU will likely be slower than doing this on the CPU)

@github-actions github-actions bot added the cpp label Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp feature request New feature or request non-breaking Introduces a non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

2 participants