blob: 06f956b18e603ee4a29bdfb495ea75f378c93b47 [file] [log] [blame]
Ryan Prichard7aea7e92022-01-13 17:30:17 -08001HIP_ARCHITECTURES
2-----------------
3
4.. versionadded:: 3.21
5
6List of AMD GPU architectures to generate device code for.
7
8A non-empty false value (e.g. ``OFF``) disables adding architectures.
9This is intended to support packagers and rare cases where full control
10over the passed flags is required.
11
12This property is initialized by the value of the :variable:`CMAKE_HIP_ARCHITECTURES`
13variable if it is set when a target is created.
14
15The HIP compilation model has two modes: whole and separable. Whole compilation
16generates device code at compile time. Separable compilation generates device
17code at link time. Therefore the ``HIP_ARCHITECTURES`` target property should
18be set on targets that compile or link with any HIP sources.
19
20Examples
21^^^^^^^^
22
23.. code-block:: cmake
24
25 set_property(TARGET tgt PROPERTY HIP_ARCHITECTURES gfx801 gfx900)
26
27Generates code for both ``gfx801`` and ``gfx900``.