File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ function(rapids_cuda_set_architectures mode)
85
85
list (TRANSFORM CMAKE_CUDA_ARCHITECTURES APPEND "-real" )
86
86
endif ()
87
87
88
+ # CUDA 12.8.0 and later warns when compiling for arch 70. We ignore this warning when compiling
89
+ # for RAPIDS architectures.
90
+ if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL
91
+ 12.8.0 )
92
+ string (APPEND CMAKE_CUDA_FLAGS " -Wno-deprecated-gpu-targets" )
93
+ endif ()
94
+
88
95
# cache the cuda archs.
89
96
get_property (cached_value GLOBAL PROPERTY rapids_cuda_architectures )
90
97
if (NOT cached_value )
@@ -103,5 +110,6 @@ function(rapids_cuda_set_architectures mode)
103
110
104
111
# Set as a local variable to maintain comp
105
112
set (CMAKE_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES} PARENT_SCOPE )
113
+ set (CMAKE_CUDA_FLAGS ${CMAKE_CUDA_FLAGS} PARENT_SCOPE )
106
114
107
115
endfunction ()
Original file line number Diff line number Diff line change 1
1
#=============================================================================
2
- # Copyright (c) 2021-2024 , NVIDIA CORPORATION.
2
+ # Copyright (c) 2021-2025 , NVIDIA CORPORATION.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -29,3 +29,9 @@ endforeach()
29
29
if (NOT DEFINED CACHE {CMAKE_CUDA_ARCHITECTURES} )
30
30
message (FATAL_ERROR "rapids_cuda_set_architectures didn't make CMAKE_CUDA_ARCHITECTURES a cache variable" )
31
31
endif ()
32
+
33
+ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8.0 )
34
+ if (NOT CMAKE_CUDA_FLAGS MATCHES "Wno-deprecated-gpu-targets" )
35
+ message (FATAL_ERROR "CMAKE_CUDA_FLAGS should have -Wno-deprecated-gpu-targets" )
36
+ endif ()
37
+ endif ()
Original file line number Diff line number Diff line change 1
1
#=============================================================================
2
- # Copyright (c) 2021-2024 , NVIDIA CORPORATION.
2
+ # Copyright (c) 2021-2025 , NVIDIA CORPORATION.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -48,3 +48,9 @@ list(APPEND CMAKE_CUDA_ARCHITECTURES ${last_value})
48
48
if (NOT DEFINED CACHE {CMAKE_CUDA_ARCHITECTURES} )
49
49
message (FATAL_ERROR "rapids_cuda_set_architectures didn't make CMAKE_CUDA_ARCHITECTURES a cache variable" )
50
50
endif ()
51
+
52
+ if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8.0 )
53
+ if (NOT CMAKE_CUDA_FLAGS MATCHES "Wno-deprecated-gpu-targets" )
54
+ message (FATAL_ERROR "CMAKE_CUDA_FLAGS should have -Wno-deprecated-gpu-targets" )
55
+ endif ()
56
+ endif ()
You can’t perform that action at this time.
0 commit comments