Skip to content

build: link cuVS when SVM is the only algorithm selected - #8532

Open
maxwbuckley wants to merge 1 commit into
NVIDIA:mainfrom
maxwbuckley:build/link-cuvs-for-svm
Open

build: link cuVS when SVM is the only algorithm selected#8532
maxwbuckley wants to merge 1 commit into
NVIDIA:mainfrom
maxwbuckley:build/link-cuvs-for-svm

Conversation

@maxwbuckley

Copy link
Copy Markdown

-DCUML_ALGORITHMS=SVM does not build. SVM's kernel cache includes cuVS
headers directly:

src/svm/sparse_util.cuh:28:  #include <cuvs/distance/distance.hpp>
src/svm/kernelcache.cuh:35:  #include <cuvs/distance/grammian.hpp>

and SVC resolves its kernel function through
cuvs::distance::kernels::KernelFactory. But svm_algo is missing from the
list in ConfigureAlgorithms.cmake that turns on LINK_CUVS, so
get_cuvs.cmake is never included and the cuVS include directories never
reach the compile line:

FAILED: CMakeFiles/cuml_objs.dir/src/svm/svc.cu.o
src/svm/sparse_util.cuh:28:10: fatal error: cuvs/distance/distance.hpp:
No such file or directory

CUML_ALGORITHMS=ALL is unaffected: it takes the other branch, which sets
LINK_CUVS ON unconditionally. Only subset builds that select SVM without
also selecting one of dbscan/hdbscan/kmeans/knn/metrics/tsne/umap are broken,
which is why this has gone unnoticed.

Verified both directions on the same build tree:

before: svc.cu.o compile line contains no -I for cuvs; build fails with
the error above
after: "CPM: Adding package cuvs", the compile line gains
-I/cpp/include, and src/svm/svc.cu and src/svm/svr.cu
compile clean

@maxwbuckley
maxwbuckley requested a review from a team as a code owner August 31, 2026 20:22
@maxwbuckley
maxwbuckley requested a review from dantegd August 31, 2026 20:22
@copy-pr-bot

copy-pr-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 78da8b6f-43ad-4d78-babc-0d3436cd81c7

📥 Commits

Reviewing files that changed from the base of the PR and between da63d9a and 8be7820.

📒 Files selected for processing (1)
  • cpp/cmake/modules/ConfigureAlgorithms.cmake

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Enabled the required CUVS linking when selecting the SVM algorithm, ensuring builds configure correctly for SVM support.

Walkthrough

The CMake algorithm configuration now enables LINK_CUVS when svm_algo is selected.

Changes

CUVS linking configuration

Layer / File(s) Summary
Add SVM CUVS linking trigger
cpp/cmake/modules/ConfigureAlgorithms.cmake
The LINK_CUVS condition now includes svm_algo.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 8be78

This change enables cuVS linkage for SVM-only builds and resolves the documented compile failure without changing runtime behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: dantegd

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: enabling cuVS linking when SVM is the only selected algorithm.
Description check ✅ Passed The description directly explains the SVM subset-build failure, identifies the missing svm_algo configuration, and documents validation of the fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

`-DCUML_ALGORITHMS=SVM` does not build. SVM's kernel cache includes cuVS
headers directly:

    src/svm/sparse_util.cuh:28:  #include <cuvs/distance/distance.hpp>
    src/svm/kernelcache.cuh:35:  #include <cuvs/distance/grammian.hpp>

and `SVC` resolves its kernel function through
`cuvs::distance::kernels::KernelFactory`. But `svm_algo` is missing from the
list in `ConfigureAlgorithms.cmake` that turns on `LINK_CUVS`, so
`get_cuvs.cmake` is never included and the cuVS include directories never
reach the compile line:

    FAILED: CMakeFiles/cuml_objs.dir/src/svm/svc.cu.o
    src/svm/sparse_util.cuh:28:10: fatal error: cuvs/distance/distance.hpp:
    No such file or directory

`CUML_ALGORITHMS=ALL` is unaffected: it takes the other branch, which sets
`LINK_CUVS ON` unconditionally. Only subset builds that select SVM without
also selecting one of dbscan/hdbscan/kmeans/knn/metrics/tsne/umap are broken,
which is why this has gone unnoticed.

Verified both directions on the same build tree:

  before:  svc.cu.o compile line contains no -I for cuvs; build fails with
           the error above
  after:   "CPM: Adding package cuvs", the compile line gains
           -I<cuvs>/cpp/include, and src/svm/svc.cu and src/svm/svr.cu
           compile clean
@maxwbuckley
maxwbuckley force-pushed the build/link-cuvs-for-svm branch from 8be7820 to 08fcd2d Compare September 5, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants