summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-22 13:19:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-22 13:19:52 (GMT)
commit122ec98dcfa273d17c2ae7ccacbaf3a47d14152c (patch)
tree653a0a27d732a38b49657ff36fb44a81303e9c2c /Help/variable
parentd2655c59dc914ec24f2bca142a748612caeb9e3d (diff)
parent6546aa2a2a2f695237a2f14745d18fc8a52b1fcf (diff)
downloadCMake-122ec98dcfa273d17c2ae7ccacbaf3a47d14152c.zip
CMake-122ec98dcfa273d17c2ae7ccacbaf3a47d14152c.tar.gz
CMake-122ec98dcfa273d17c2ae7ccacbaf3a47d14152c.tar.bz2
Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs 18158bf81c HIP: Add support for NVIDIA GPUs 127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform 90e23f40ee Tests/HIP/WithDefs: Clean up test case 9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image 26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8817
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_HIP_ARCHITECTURES.rst10
-rw-r--r--Help/variable/CMAKE_HIP_PLATFORM.rst22
2 files changed, 29 insertions, 3 deletions
diff --git a/Help/variable/CMAKE_HIP_ARCHITECTURES.rst b/Help/variable/CMAKE_HIP_ARCHITECTURES.rst
index bcc6b35..3f17983 100644
--- a/Help/variable/CMAKE_HIP_ARCHITECTURES.rst
+++ b/Help/variable/CMAKE_HIP_ARCHITECTURES.rst
@@ -3,10 +3,14 @@ CMAKE_HIP_ARCHITECTURES
.. versionadded:: 3.21
-Default value for :prop_tgt:`HIP_ARCHITECTURES` property of targets.
+List of GPU architectures to for which to generate device code.
+Architecture names are interpreted based on :variable:`CMAKE_HIP_PLATFORM`.
-This is initialized to the architectures reported by ``rocm_agent_enumerator``,
-if available, and otherwise to the default chosen by the compiler.
+This is initialized based on the value of :variable:`CMAKE_HIP_PLATFORM`:
+
+``amd``
+ Uses architectures reported by ``rocm_agent_enumerator``, if available,
+ and otherwise to a default chosen by the compiler.
This variable is used to initialize the :prop_tgt:`HIP_ARCHITECTURES` property
on all targets. See the target property for additional information.
diff --git a/Help/variable/CMAKE_HIP_PLATFORM.rst b/Help/variable/CMAKE_HIP_PLATFORM.rst
new file mode 100644
index 0000000..5e3a2b7
--- /dev/null
+++ b/Help/variable/CMAKE_HIP_PLATFORM.rst
@@ -0,0 +1,22 @@
+CMAKE_HIP_PLATFORM
+------------------
+
+.. versionadded:: 3.28
+
+GPU platform for which HIP language sources are to be compiled.
+
+The value must be one of:
+
+``amd``
+ AMD GPUs
+
+``nvidia``
+ NVIDIA GPUs
+
+If not specified, a default is computed via ``hipconfig --platform``.
+
+:variable:`CMAKE_HIP_ARCHITECTURES` entries are interpreted with
+as architectures of the GPU platform.
+
+:variable:`CMAKE_HIP_COMPILER <CMAKE_<LANG>_COMPILER>` must target
+the same GPU platform.