mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only platform we currently support.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
hip-nvidia
|
||||
----------
|
||||
|
||||
* The :variable:`CMAKE_HIP_PLATFORM` variable was added to specify
|
||||
the GPU platform for which HIP language sources are to be compiled
|
||||
(``amd``).
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
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
|
||||
|
||||
If not specified, the default is ``amd``.
|
||||
|
||||
: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.
|
||||
Reference in New Issue
Block a user