-
Notifications
You must be signed in to change notification settings - Fork 151
prefer CUDA 13.1 devcontainers, react to some cutlass removals in RAFT #1686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
ba5b6f6
a7f76da
3d62f9c
2813673
a039844
bfe628f
6c0485d
4269580
89a5968
f0cb5c0
315eff1
c04b189
1842620
76a66eb
c2dd949
4424cbd
5caac0b
9d102ce
523e320
59fd826
4f7a38b
71a5129
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -334,7 +334,7 @@ jobs: | |
| uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
| with: | ||
| arch: '["amd64", "arm64"]' | ||
| cuda: '["13.0"]' | ||
| cuda: '["13.1"]' | ||
| node_type: "cpu8" | ||
| rapids-aux-secret-1: GIST_REPO_READ_ORG_GITHUB_TOKEN | ||
| env: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| From 661c7e679ac72926d619da46834d09f52a727f5e Mon Sep 17 00:00:00 2001 | ||
| From: Robert Maynard <[email protected]> | ||
| 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 | ||
| $<BUILD_INTERFACE:${CUDA_TOOLKIT_ROOT_DIR}/include> | ||
| - $<BUILD_INTERFACE:${CUDA_TOOLKIT_ROOT_DIR}/include/cccl> | ||
| ) | ||
| +if(CUDA_VERSION VERSION_GREATER_EQUAL 13.0) | ||
| + target_include_directories( | ||
| + CUTLASS | ||
| + SYSTEM INTERFACE | ||
| + $<BUILD_INTERFACE:${CUDA_TOOLKIT_ROOT_DIR}/include/cccl> | ||
| + ) | ||
| +endif() | ||
|
|
||
| install( | ||
| DIRECTORY | ||
| -- | ||
| 2.39.5 (Apple Git-154) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # ============================================================================= | ||
| # cmake-format: off | ||
| # SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # cmake-format: on | ||
| # ============================================================================= | ||
|
|
@@ -24,9 +24,7 @@ function(find_and_configure_cutlass) | |
| CACHE BOOL "Disable CUTLASS to build with cuBLAS library." | ||
| ) | ||
|
|
||
| if (CUDA_STATIC_RUNTIME) | ||
| set(CUDART_LIBRARY "${CUDA_cudart_static_LIBRARY}" CACHE FILEPATH "fixing cutlass cmake code" FORCE) | ||
| endif() | ||
| set(CUDART_LIBRARY "${CUDA_cudart_static_LIBRARY}" CACHE FILEPATH "fixing cutlass cmake code" FORCE) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the change to always static?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean the other way round? The conditional is removed now. This option just tells so to CUTLASS.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change was part of raft and not mirrored to cuvs. |
||
|
|
||
| include("${rapids-cmake-dir}/cpm/package_override.cmake") | ||
| rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/cutlass_override.json") | ||
|
|
@@ -49,6 +47,34 @@ function(find_and_configure_cutlass) | |
| add_library(nvidia::cutlass::cutlass ALIAS CUTLASS) | ||
| endif() | ||
|
|
||
| # export cutlass so projects that depend on cuVS can find it | ||
| if(NvidiaCutlass_ADDED) | ||
| rapids_export( | ||
| BUILD NvidiaCutlass | ||
| EXPORT_SET NvidiaCutlass | ||
| GLOBAL_TARGETS nvidia::cutlass::cutlass | ||
| NAMESPACE nvidia::cutlass:: | ||
| ) | ||
| endif() | ||
|
|
||
| rapids_export_package( | ||
| BUILD NvidiaCutlass cuvs-exports GLOBAL_TARGETS nvidia::cutlass::cutlass | ||
| ) | ||
|
||
| rapids_export_package( | ||
| INSTALL NvidiaCutlass cuvs-exports GLOBAL_TARGETS nvidia::cutlass::cutlass | ||
| ) | ||
|
|
||
| # Tell cmake where it can find the generated NvidiaCutlass-config.cmake we wrote. | ||
| include("${rapids-cmake-dir}/export/find_package_root.cmake") | ||
| rapids_export_find_package_root( | ||
| INSTALL NvidiaCutlass [=[${CMAKE_CURRENT_LIST_DIR}/../]=] | ||
| EXPORT_SET cuvs-exports | ||
| ) | ||
| rapids_export_find_package_root( | ||
| BUILD NvidiaCutlass [=[${CMAKE_CURRENT_LIST_DIR}]=] | ||
| EXPORT_SET cuvs-exports | ||
|
||
| ) | ||
|
|
||
| endfunction() | ||
|
|
||
| find_and_configure_cutlass() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <raft/core/error.hpp> | ||
|
|
||
| #include <cutlass/cutlass.h> | ||
|
|
||
| namespace cuvs { | ||
|
|
||
| /** | ||
| * @brief Exception thrown when a CUTLASS error is encountered. | ||
| */ | ||
| struct cutlass_error : public raft::exception { | ||
| explicit cutlass_error(char const* const message) : raft::exception(message) {} | ||
| explicit cutlass_error(std::string const& message) : raft::exception(message) {} | ||
| }; | ||
|
|
||
| } // namespace cuvs | ||
|
|
||
| /** | ||
| * @brief Error checking macro for CUTLASS functions. | ||
| * | ||
| * Invokes a CUTLASS function call, if the call does not return cutlass::Status::kSuccess, | ||
| * throws an exception detailing the CUTLASS error that occurred. | ||
| * | ||
| */ | ||
| #define CUVS_CUTLASS_TRY(call) \ | ||
| do { \ | ||
| cutlass::Status const status = call; \ | ||
| if (status != cutlass::Status::kSuccess) { \ | ||
| std::string msg{}; \ | ||
| SET_ERROR_MSG(msg, \ | ||
| "CUTLASS error encountered at: ", \ | ||
| "call='%s', Reason=%s", \ | ||
| #call, \ | ||
| cutlassGetStatusString(status)); \ | ||
| throw cuvs::cutlass_error(msg); \ | ||
| } \ | ||
| } while (0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we need
cutlasshere as it isn't part of any public headerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! It is part of this file but I'll move it over to source. https://github.com/rapidsai/cuvs/pull/1686/files#diff-b220f246b1f8a4db2836dc1c87f1f30e2cee2d0f534f564e6f4cfd48e8d1a285R10