diff options
author | Brad King <brad.king@kitware.com> | 2022-03-04 18:51:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-10 14:27:29 (GMT) |
commit | d1b48bfabd6157309b3056967e6e30cc0ce07983 (patch) | |
tree | 3ce109b078bf5da4d866f6e2994bbce8246e4df1 /Help/prop_tgt | |
parent | 632752d62e8de2730796f509dbb10551351309c2 (diff) | |
download | CMake-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.rst | 5 |
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 ^^^^^^^^ |