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