Skip to content

Prepare cuvs for removal of deprecated raft apis#1610

Merged
rapids-bot[bot] merged 20 commits intorapidsai:mainfrom
aamijar:raft-deprecated-apis
Dec 13, 2025
Merged

Prepare cuvs for removal of deprecated raft apis#1610
rapids-bot[bot] merged 20 commits intorapidsai:mainfrom
aamijar:raft-deprecated-apis

Conversation

@aamijar
Copy link
Member

@aamijar aamijar commented Dec 3, 2025

Resolves #1601, Resolves #1491

What does this PR do?

  1. Removes lingering unused raft headers that will be deprecated such as #include <raft/neighbors/refine.cuh>, #include <raft/distance/distance_types.hpp>, etc.
  2. Exposes build_dendrogram_host which is used by cuml. cuml currently uses the raft version. The raft version was moved to cuvs but it is not in the public interface.
  3. This PR also removes the legacy spectral related files.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 3, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@aamijar aamijar self-assigned this Dec 3, 2025
@aamijar aamijar moved this from Done to In Progress in Vector Search, ML, & Data Mining Release Board Dec 3, 2025
@aamijar aamijar added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Dec 3, 2025
@aamijar aamijar marked this pull request as ready for review December 3, 2025 09:15
@aamijar aamijar requested review from a team as code owners December 3, 2025 09:15
Copy link
Contributor

@jinsolp jinsolp left a comment

Choose a reason for hiding this comment

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

Thanks @aamijar , leaving a few comments.

Also, do you think you can fix the related docs as well? I think this is the only place that has outdated docs including raft files, but might be a good idea to check on your end as well : )

* #include <raft/core/resources.hpp>
* #include <raft/neighbors/ball_cover.cuh>
* #include <raft/distance/distance_types.hpp>
* using namespace raft::neighbors;

@@ -405,7 +405,6 @@ if(NOT BUILD_CPU_ONLY)
src/distance/distance.cu
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we add agglomerative.cu in the cmakelists?

@jinsolp
Copy link
Contributor

jinsolp commented Dec 4, 2025

Also, can we try pinning the raft branch to make sure it's working well on that branch (to ensure we haven't missed anything)

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 6, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@aamijar aamijar force-pushed the raft-deprecated-apis branch from 64c26fb to cde8d9b Compare December 6, 2025 08:29
@aamijar
Copy link
Member Author

aamijar commented Dec 8, 2025

Hi @jinsolp, I think I have addressed your comments

Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to revert before merging.

Copy link
Contributor

@jinsolp jinsolp left a comment

Choose a reason for hiding this comment

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

Approving with minor suggestions on the docs!

aamijar and others added 2 commits December 8, 2025 16:29
Co-authored-by: Jinsol Park <jinsolp@nvidia.com>
Co-authored-by: Jinsol Park <jinsolp@nvidia.com>
Comment on lines 249 to 257
void build_dendrogram_host(raft::resources const& handle,
const int64_t* rows,
const int64_t* cols,
const float* data,
size_t nnz,
int64_t* children,
float* out_delta,
int64_t* out_size);

Copy link
Member

Choose a reason for hiding this comment

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

cuVS only allows for mdspan based public APIs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in 59bd5e5

Copy link
Member

Choose a reason for hiding this comment

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

Can you also drop the _host suffix? That's just an implementation detail.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in e163b2a

@jinsolp
Copy link
Contributor

jinsolp commented Dec 13, 2025

/merge

@rapids-bot rapids-bot bot merged commit e72dd2a into rapidsai:main Dec 13, 2025
92 checks passed
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Dec 15, 2025
Resolves #7554, Depends on rapidsai/cuvs#1610 (CI won't pass until this is merged)

What does this PR do?

1. Removes lingering **unused** raft headers that will be deprecated such as `#include <raft/spatial/knn/knn.cuh>`, `#include <raft/distance/distance.cuh>`, etc.
2. ~~Updates to raft::memory_type_from_pointer instead of the deprecated raft::spatial::knn::detail::utils::pointer_residency.~~
3. Removes `metric_processor` from `knn.hpp` and `knn.cu`. 
The only special metric processing needed is for correlation distance which we can handle in `knn.cu` instead of using the class from `processing.cuh` from raft. The cosine distance is supported in ivf_flat and ivf_pq in cuvs so we do **not** need to use the innerproduct metric and special processing that was there before.
4. Uses `build_dendrogram_host` from cuvs instead of raft.

Authors:
  - Anupam (https://github.com/aamijar)

Approvers:
  - Victor Lafargue (https://github.com/viclafargue)

URL: #7561
rapids-bot bot pushed a commit to rapidsai/raft that referenced this pull request Dec 17, 2025
…ghbors/` apis (#2885)

Supersedes #2813 and #2878
Resolves #2737 and Resolves #2872

Marking as **breaking** to get more eyes on this and mitigate risk.
This PR should not break downstream libraries as long as we merge the updates to them first: rapidsai/cuvs#1610, rapidsai/cuml#7561. 
I've found a usage of breaking api in FAISS here:
https://github.com/facebookresearch/faiss/blob/1721ebff6de6ed5a8481302123479be9d85059a2/faiss/gpu/GpuDistance.cu#L46.
https://github.com/facebookresearch/faiss/blob/5b19fca3f057b837ac898af52a8eb801c4744892/faiss/gpu/impl/CuvsFlatIndex.cu#L34

What does this PR do?
1. Removes `cluster/`, `distance/`, `neighbors/` (except `detail/faiss_select/`), `sparse/neighbors/`, `spatial/`
2. Removes unused includes that will be deprecated such as `#include <raft/distance/distance.cuh>`, `#include <raft/spatial/knn/knn.cuh>`, etc.
3. Removes legacy lanczos solver (`linalg/lanczos`, `sparse/linalg/lanczos` old functions in `sparse/solver/lanczos`) and removes legacy spectral apis (`spectral/ ` except modularity_maximization and partition which are metrics used by cugraph)
4. Removes corresponding gtests, raft_runtime, and bench files.

Authors:
  - Anupam (https://github.com/aamijar)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #2885
mani-builds pushed a commit to mani-builds/cuml that referenced this pull request Jan 11, 2026
Resolves rapidsai#7554, Depends on rapidsai/cuvs#1610 (CI won't pass until this is merged)

What does this PR do?

1. Removes lingering **unused** raft headers that will be deprecated such as `#include <raft/spatial/knn/knn.cuh>`, `#include <raft/distance/distance.cuh>`, etc.
2. ~~Updates to raft::memory_type_from_pointer instead of the deprecated raft::spatial::knn::detail::utils::pointer_residency.~~
3. Removes `metric_processor` from `knn.hpp` and `knn.cu`. 
The only special metric processing needed is for correlation distance which we can handle in `knn.cu` instead of using the class from `processing.cuh` from raft. The cosine distance is supported in ivf_flat and ivf_pq in cuvs so we do **not** need to use the innerproduct metric and special processing that was there before.
4. Uses `build_dendrogram_host` from cuvs instead of raft.

Authors:
  - Anupam (https://github.com/aamijar)

Approvers:
  - Victor Lafargue (https://github.com/viclafargue)

URL: rapidsai#7561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

Prepare cuvs for removal of deprecated raft apis Remove legacy spectral related files

4 participants