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
This commit is contained in:
Brad King
2023-09-22 13:19:44 +00:00
committed by Kitware Robot
33 changed files with 349 additions and 48 deletions

View File

@@ -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.

View File

@@ -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.