diff options
author | Brad King <brad.king@kitware.com> | 2023-09-18 18:11:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-21 19:34:37 (GMT) |
commit | 127b6fa06bf53ad9f31d041a7d11434ca2856c8e (patch) | |
tree | 26f2bdb717a1592b9a31fb6bc1cdff37f42a1373 /Help/variable | |
parent | 90e23f40ee27c0990b30b3640731e89539cb3990 (diff) | |
download | CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.zip CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.tar.gz CMake-127b6fa06bf53ad9f31d041a7d11434ca2856c8e.tar.bz2 |
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.
Diffstat (limited to 'Help/variable')
-rw-r--r-- | Help/variable/CMAKE_HIP_ARCHITECTURES.rst | 10 | ||||
-rw-r--r-- | Help/variable/CMAKE_HIP_PLATFORM.rst | 19 |
2 files changed, 26 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..1715066 --- /dev/null +++ b/Help/variable/CMAKE_HIP_PLATFORM.rst @@ -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. |