diff options
author | Brad King <brad.king@kitware.com> | 2023-09-22 13:19:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-09-22 13:19:52 (GMT) |
commit | 122ec98dcfa273d17c2ae7ccacbaf3a47d14152c (patch) | |
tree | 653a0a27d732a38b49657ff36fb44a81303e9c2c /Help | |
parent | d2655c59dc914ec24f2bca142a748612caeb9e3d (diff) | |
parent | 6546aa2a2a2f695237a2f14745d18fc8a52b1fcf (diff) | |
download | CMake-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')
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/prop_tgt/HIP_ARCHITECTURES.rst | 3 | ||||
-rw-r--r-- | Help/release/dev/hip-nvidia.rst | 9 | ||||
-rw-r--r-- | Help/variable/CMAKE_HIP_ARCHITECTURES.rst | 10 | ||||
-rw-r--r-- | Help/variable/CMAKE_HIP_PLATFORM.rst | 22 |
5 files changed, 41 insertions, 4 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index fa7a90f..536046a 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -590,6 +590,7 @@ Variables for Languages /variable/CMAKE_Fortran_MODOUT_FLAG /variable/CMAKE_HIP_ARCHITECTURES /variable/CMAKE_HIP_EXTENSIONS + /variable/CMAKE_HIP_PLATFORM /variable/CMAKE_HIP_STANDARD /variable/CMAKE_HIP_STANDARD_REQUIRED /variable/CMAKE_ISPC_HEADER_DIRECTORY diff --git a/Help/prop_tgt/HIP_ARCHITECTURES.rst b/Help/prop_tgt/HIP_ARCHITECTURES.rst index 06f956b..58a813d 100644 --- a/Help/prop_tgt/HIP_ARCHITECTURES.rst +++ b/Help/prop_tgt/HIP_ARCHITECTURES.rst @@ -3,7 +3,8 @@ HIP_ARCHITECTURES .. versionadded:: 3.21 -List of AMD GPU architectures to generate device code for. +List of GPU architectures to for which to generate device code. +Architecture names are interpreted based on :variable:`CMAKE_HIP_PLATFORM`. A non-empty false value (e.g. ``OFF``) disables adding architectures. This is intended to support packagers and rare cases where full control diff --git a/Help/release/dev/hip-nvidia.rst b/Help/release/dev/hip-nvidia.rst new file mode 100644 index 0000000..1d9814e --- /dev/null +++ b/Help/release/dev/hip-nvidia.rst @@ -0,0 +1,9 @@ +hip-nvidia +---------- + +* ``HIP`` language code may now be compiled for NVIDIA GPUs + using the NVIDIA CUDA Compiler (NVCC). + +* The :variable:`CMAKE_HIP_PLATFORM` variable was added to specify + the GPU platform for which HIP language sources are to be compiled + (``amd`` or ``nvidia``). 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. |