build: link cuVS when SVM is the only algorithm selected - #8532
build: link cuVS when SVM is the only algorithm selected#8532maxwbuckley wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe CMake algorithm configuration now enables ChangesCUVS linking configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation 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 💡
🧪 Generate unit tests (beta)
Comment |
`-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
8be7820 to
08fcd2d
Compare
-DCUML_ALGORITHMS=SVMdoes not build. SVM's kernel cache includes cuVSheaders directly:
and
SVCresolves its kernel function throughcuvs::distance::kernels::KernelFactory. Butsvm_algois missing from thelist in
ConfigureAlgorithms.cmakethat turns onLINK_CUVS, soget_cuvs.cmakeis never included and the cuVS include directories neverreach the compile line:
CUML_ALGORITHMS=ALLis unaffected: it takes the other branch, which setsLINK_CUVS ONunconditionally. Only subset builds that select SVM withoutalso 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