@@ -13,58 +13,43 @@ else()
1313 enable_language (CUDA )
1414 add_cython_target (_cuda CXX )
1515
16+ add_compile_options (-DCCCL_IGNORE_DEPRECATED_STREAM_REF_HEADER )
17+
1618 # use rapids-cmake to install dependencies
17- file (DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.12/RAPIDS.cmake
19+ set (rapids-cmake-version "26.02" )
20+ file (DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/refs/heads/release/26.02/RAPIDS.cmake
1821 ${CMAKE_BINARY_DIR} /RAPIDS.cmake )
1922 include (${CMAKE_BINARY_DIR} /RAPIDS.cmake )
2023 include (rapids-cmake )
2124 include (rapids-cpm )
2225 include (rapids-cuda )
2326 include (rapids-export )
2427 include (rapids-find )
25- include (${rapids-cmake-dir}/cpm/package_override.cmake )
2628
2729 rapids_cpm_init ()
2830 rapids_cmake_build_type (Release )
2931
30- # thrust/cub have a cmake issue where the conda build fails
31- # to find them, and needs these patches
32- # https://github.com/benfred/cub/commit/97934d146b771fd2e8bda75f73349a4b3c9e10a7
33- # https://github.com/benfred/thrust/commit/8452c764cc8d772314169e99811535f3a9108cfe
34- # (note that cub is pulled in through thrust here - meaning we only need to override
35- # the thrust version to pull it in)
36- # Issue is tracked in https://github.com/NVIDIA/thrust/issues/1966
37- file (WRITE ${CMAKE_CURRENT_BINARY_DIR} /override.json
38- [=[
39- {
40- "packages" : {
41- "Thrust" : {
42- "version" : "1.17.2",
43- "git_url" : "https://github.com/benfred/thrust.git",
44- "git_tag" : "no_cmake_find_root_path",
45- "git_shallow" : true,
46- "always_download" : true,
47- }
48- }
49- }
50- ]=] )
51- rapids_cpm_package_override (${CMAKE_CURRENT_BINARY_DIR} /override.json )
32+ # We must find CCCL ourselves before raft so that we get the right version.
33+ include (${rapids-cmake-dir}/cpm/cccl.cmake )
34+ rapids_cpm_cccl (BUILD_EXPORT_SET implicit-exports INSTALL_EXPORT_SET implicit-exports )
5235
5336 # get rmm
5437 include (${rapids-cmake-dir}/cpm/rmm.cmake )
5538 rapids_cpm_rmm (BUILD_EXPORT_SET implicit-exports INSTALL_EXPORT_SET implicit-exports )
5639
57- # get raft
58- # note: we're using RAFT in header only mode right now - mainly to reduce binary
59- # size of the compiled wheels
60- rapids_cpm_find ( raft 23.12
40+ rapids_cpm_find ( raft 26.02
41+ GLOBAL_TARGETS raft::raft
42+ BUILD_EXPORT_SET implicit-exports
43+ INSTALL_EXPORT_SET implicit-exports
6144 CPM_ARGS
6245 GIT_REPOSITORY https://github.com/rapidsai/raft.git
63- GIT_TAG branch-23.12
64- DOWNLOAD_ONLY YES
46+ GIT_TAG v26.02.00
47+ SOURCE_SUBDIR cpp
48+ OPTIONS
49+ "BUILD_TESTS OFF"
50+ "BUILD_PRIMS_BENCH OFF"
51+ "RAFT_COMPILE_LIBRARY OFF"
6552 )
66- include_directories (${raft_SOURCE_DIR} /cpp/include )
67-
6853 set (CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda -Wno-deprecated-gpu-targets -Xfatbin=-compress-all --expt-relaxed-constexpr" )
6954
7055 add_library (_cuda MODULE ${_cuda}
@@ -85,15 +70,15 @@ else()
8570 set_target_properties (_cuda PROPERTIES CUDA_ARCHITECTURES "60;70;80" )
8671 elseif (${CUDAToolkit_VERSION} VERSION_LESS "11.8.0" )
8772 set_target_properties (_cuda PROPERTIES CUDA_ARCHITECTURES "60;70;80;86" )
88- elseif (${CUDAToolkit_VERSION} VERSION_LESS "12 .0.0" )
73+ elseif (${CUDAToolkit_VERSION} VERSION_LESS "13 .0.0" )
8974 set_target_properties (_cuda PROPERTIES CUDA_ARCHITECTURES "60;70;80;86;90" )
9075 else ()
9176 set_target_properties (_cuda PROPERTIES CUDA_ARCHITECTURES "80;86;90;100;120" )
9277 endif ()
9378 get_target_property (CUDA_ARCH _cuda CUDA_ARCHITECTURES )
9479 message ("using cuda architectures ${CUDA_ARCH} for cuda version ${CUDAToolkit_VERSION} " )
9580 endif ()
96- target_link_libraries (_cuda CUDA::cublas CUDA::curand rmm::rmm )
81+ target_link_libraries (_cuda CUDA::cublas CUDA::curand rmm::rmm raft::raft )
9782
9883 install (TARGETS _cuda LIBRARY DESTINATION implicit/gpu)
9984endif ()
0 commit comments