From a0186c7a80b48acb6c1749d8a95123dbfd4ea4c1 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Mon, 4 Nov 2024 13:12:07 -0800 Subject: [PATCH] Make cuVS optional if CUML_ALGORITHMS is set (#6125) cuVS should not be required when building cuML with `CUML_ALGORITHMS=fil`. Authors: - Philip Hyunsu Cho (https://github.com/hcho3) Approvers: - William Hicks (https://github.com/wphicks) - Dante Gama Dessavre (https://github.com/dantegd) URL: https://github.com/rapidsai/cuml/pull/6125 --- cpp/CMakeLists.txt | 4 +++- cpp/cmake/modules/ConfigureAlgorithms.cmake | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f400b244c8..09f3b37875 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -228,7 +228,9 @@ endif() include(cmake/thirdparty/get_cccl.cmake) include(cmake/thirdparty/get_rmm.cmake) include(cmake/thirdparty/get_raft.cmake) -include(cmake/thirdparty/get_cuvs.cmake) +if(LINK_CUVS) + include(cmake/thirdparty/get_cuvs.cmake) +endif() if(LINK_TREELITE) include(cmake/thirdparty/get_treelite.cmake) diff --git a/cpp/cmake/modules/ConfigureAlgorithms.cmake b/cpp/cmake/modules/ConfigureAlgorithms.cmake index 5dcc0a383a..f93425405e 100644 --- a/cpp/cmake/modules/ConfigureAlgorithms.cmake +++ b/cpp/cmake/modules/ConfigureAlgorithms.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ if(CUML_ALGORITHMS STREQUAL "ALL") set(CUML_RAFT_COMPILED ON) set(LINK_TREELITE ON) set(LINK_CUFFT ON) + set(LINK_CUVS ON) set(all_algo ON) # setting treeshap to ON to get the gputreeshap include in the cuml_cpp_target set(treeshap_algo ON) @@ -122,5 +123,10 @@ else() if(metrics_algo) set(CUML_RAFT_COMPILED ON) endif() + + if(dbscan_algo OR hdbscan_algo OR kmeans_algo OR knn_algo + OR metrics_algo OR tsne_algo OR umap_algo) + set(LINK_CUVS ON) + endif() endif()