diff --git a/cpp/cmake/patches/cutlass/Support-both-CUDA-12-and-13-cccl-header-locations.patch b/cpp/cmake/patches/cutlass/Support-both-CUDA-12-and-13-cccl-header-locations.patch new file mode 100644 index 0000000000..489ac69f93 --- /dev/null +++ b/cpp/cmake/patches/cutlass/Support-both-CUDA-12-and-13-cccl-header-locations.patch @@ -0,0 +1,31 @@ +From 661c7e679ac72926d619da46834d09f52a727f5e Mon Sep 17 00:00:00 2001 +From: Robert Maynard +Date: Tue, 5 Aug 2025 15:05:57 -0400 +Subject: [PATCH] Support both CUDA 12 and 13 cccl header locations + +--- + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 38dcca9f..4088b71f 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -704,8 +704,14 @@ target_include_directories( + CUTLASS + SYSTEM INTERFACE + $ +- $ + ) ++if(CUDA_VERSION VERSION_GREATER_EQUAL 13.0) ++ target_include_directories( ++ CUTLASS ++ SYSTEM INTERFACE ++ $ ++ ) ++endif() + + install( + DIRECTORY +-- +2.39.5 (Apple Git-154) diff --git a/cpp/cmake/patches/cutlass/build-export.patch b/cpp/cmake/patches/cutlass/build-export.patch deleted file mode 100644 index 31bbd25102..0000000000 --- a/cpp/cmake/patches/cutlass/build-export.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e0a9597946257a01ae8444200f836ee51d5597ba Mon Sep 17 00:00:00 2001 -From: Kyle Edwards -Date: Wed, 20 Nov 2024 16:37:38 -0500 -Subject: [PATCH] Remove erroneous include directories - -These directories are left over from when CuTe was a separate -CMake project. Remove them. ---- - CMakeLists.txt | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7419bdf5e..545384d82 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -665,8 +665,6 @@ target_include_directories( - $ - $ - $ -- $ -- $ - ) - - # Mark CTK headers as system to supress warnings from them --- -2.34.1 diff --git a/cpp/cmake/patches/cutlass_override.json b/cpp/cmake/patches/cutlass_override.json index 7bf818987f..bf9791ebd1 100644 --- a/cpp/cmake/patches/cutlass_override.json +++ b/cpp/cmake/patches/cutlass_override.json @@ -1,13 +1,13 @@ { "packages" : { "cutlass" : { - "version": "3.5.1", + "version": "4.1.0", "git_url": "https://github.com/NVIDIA/cutlass.git", "git_tag": "v${version}", "patches" : [ { - "file" : "${current_json_dir}/cutlass/build-export.patch", - "issue" : "Fix build directory export", + "file" : "${current_json_dir}/cutlass/Support-both-CUDA-12-and-13-cccl-header-locations.patch", + "issue" : "Support CUDA 12 CTK layout[https://github.com/NVIDIA/cutlass/pull/2543]", "fixed_in" : "" } ] diff --git a/cpp/cmake/thirdparty/get_cutlass.cmake b/cpp/cmake/thirdparty/get_cutlass.cmake index 2a12d63f22..8ad6da994b 100644 --- a/cpp/cmake/thirdparty/get_cutlass.cmake +++ b/cpp/cmake/thirdparty/get_cutlass.cmake @@ -39,19 +39,14 @@ function(find_and_configure_cutlass) include("${rapids-cmake-dir}/cpm/package_override.cmake") rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/cutlass_override.json") - include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") - rapids_cpm_package_details(cutlass version repository tag shallow exclude) - - include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake") - rapids_cpm_generate_patch_command(cutlass ${version} patch_command build_patch_only) + include("${rapids-cmake-dir}/cpm/detail/package_info.cmake") + rapids_cpm_package_info(cutlass VERSION_VAR version FIND_VAR find_args CPM_VAR cpm_find_info + TO_INSTALL_VAR to_install) rapids_cpm_find( - NvidiaCutlass ${version} ${build_patch_only} + NvidiaCutlass ${version} ${find_args} GLOBAL_TARGETS nvidia::cutlass::cutlass - CPM_ARGS - GIT_REPOSITORY ${repository} - GIT_TAG ${tag} - GIT_SHALLOW ${shallow} ${patch_command} + CPM_ARGS ${cpm_find_info} OPTIONS "CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_DIR}" ) @@ -67,7 +62,6 @@ function(find_and_configure_cutlass) NAMESPACE nvidia::cutlass:: ) endif() - # endif() # We generate the cutlass-config files when we built cutlass locally, so always do # `find_dependency`