summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-04 18:51:49 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-10 14:27:29 (GMT)
commitd1b48bfabd6157309b3056967e6e30cc0ce07983 (patch)
tree3ce109b078bf5da4d866f6e2994bbce8246e4df1 /Help/prop_tgt
parent632752d62e8de2730796f509dbb10551351309c2 (diff)
downloadCMake-d1b48bfabd6157309b3056967e6e30cc0ce07983.zip
CMake-d1b48bfabd6157309b3056967e6e30cc0ce07983.tar.gz
CMake-d1b48bfabd6157309b3056967e6e30cc0ce07983.tar.bz2
CUDA: Add support for CUDA_ARCHITECTURES=native
CUDA 11.6 added the `nvcc -arch=native` flag to automatically compile for the host GPUs' architectures. Add support for specifying this special `native` value in `CMAKE_CUDA_ARCHITECTURES` and `CUDA_ARCHITECTURES`. During the compiler ABI detection step, detect the native architectures so we can pass them explicitly when using Clang or older versions of nvcc. Fixes: #22375
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r--Help/prop_tgt/CUDA_ARCHITECTURES.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Help/prop_tgt/CUDA_ARCHITECTURES.rst b/Help/prop_tgt/CUDA_ARCHITECTURES.rst
index 191f78f..05c2599 100644
--- a/Help/prop_tgt/CUDA_ARCHITECTURES.rst
+++ b/Help/prop_tgt/CUDA_ARCHITECTURES.rst
@@ -34,6 +34,11 @@ The ``CUDA_ARCHITECTURES`` may be set to one of the following special values:
Compile for all supported major real architectures, and the highest
major virtual architecture.
+``native``
+ .. versionadded:: 3.24
+
+ Compile for the architecture(s) of the host's GPU(s).
+
Examples
^^^^^^^^