Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting the CPU arch #602

Merged
merged 15 commits into from
Nov 25, 2024
160 changes: 101 additions & 59 deletions docs/source/keywords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,91 +347,133 @@ Architectures
CPU architectures
-----------------

Kokkos does not automatically add or need compiler flags to optimize for a specific CPU architecture.
Nevertheless, targeting a specific architecture allows the compiler to use SIMD instructions on the CPU.
When compiling on the machine that the code also runs on, the easiest way to get the CPU code optimized is using the native option.

.. list-table::
:widths: 25 65 10
:widths: 25 75
:header-rows: 1
:align: left

* -
- Description/info
- Default

* * ``Kokkos_ARCH_NATIVE``
* Optimize for the local CPU architecture
* ``OFF``
* - ``Kokkos_ARCH_NATIVE``
- Target the architecture of the compiling CPU (``-march=native``)

* * ``Kokkos_ARCH_A64FX``
* Optimize for ARMv8.2 with SVE Support
* ``OFF``
If cross-compiling, or if you want to be specific, the CPU architecture can be passed to Kokkos manually. For the available architectures see the following list.

* * ``Kokkos_ARCH_AMDAVX``
* Optimize for AMDAVX architecture
* ``OFF``
.. list-table:: AMD CPU architectures
:widths: 30 30 30
:header-rows: 1
:align: left

* * ``Kokkos_ARCH_ARMV80``
* Optimize for ARMV80 architecture
* ``OFF``
* - CMake keyword
- Architecture/Instruction set
- Examples

* * ``Kokkos_ARCH_ARMV81``
* Optimize for ARMV81 architecture
* ``OFF``
* - ``Kokkos_ARCH_ZEN3``
- Zen 3/amd64
- Epyc 7713 @ ORNL Frontier

* * ``Kokkos_ARCH_ARMV8_THUNDERX``
* Optimize for ARMV8_THUNDERX architecture
* ``OFF``
* - ``Kokkos_ARCH_ZEN2``
- Zen 2/amd64
- Epyc 7742 @ NOAA

* * ``Kokkos_ARCH_ARMV8_THUNDERX2``
* Optimize for the ARMV8_THUNDERX2 architecture
* ``OFF``
* - ``Kokkos_ARCH_ZEN``
- Zen/amd64
- Epyc @ ANL Selene

* * ``Kokkos_ARCH_BDW``
* Optimize for BDW architecture
* ``OFF``
* - ``Kokkos_ARCH_AMDAVX``
- Bullozer/amd64
-

* * ``Kokkos_ARCH_HSW``
* Optimize for HSW architecture
* ``OFF``
.. list-table:: ARM CPU architectures
:widths: 30 30 30
:header-rows: 1
:align: left

* * ``Kokkos_ARCH_KNC``
* Optimize for KNC architecture
* ``OFF``
* - CMake keyword
- Architecture/Instruction set
- Examples

* * ``Kokkos_ARCH_KNL``
* Optimize for KNL architecture
* ``OFF``
* - ``Kokkos_ARCH_A64FX``
- ARMv8.2/A64
- A64FX @ Fugaku

* * ``Kokkos_ARCH_POWER8``
* Optimize for POWER8 architecture
* ``OFF``
* - ``Kokkos_ARCH_ARMV8_THUNDERX2``
- ARMv8/A64
- ThunderX2 @ SNL Astra
ThunderX2 @ CEA BullSequana

* * ``Kokkos_ARCH_POWER9``
* Optimize for POWER9 architecture
* ``OFF``
* - ``Kokkos_ARCH_ARMV81``
- ARMv8.1/A64,A32
-

* * ``Kokkos_ARCH_SKX``
* Optimize for SKX architecture
* ``OFF``
* - ``Kokkos_ARCH_ARMV8_THUNDERX``
- ARMv8/A64
-

* * ``Kokkos_ARCH_SNB``
* Optimize for SNB architecture
* ``OFF``
* - ``Kokkos_ARCH_ARMV80``
- ARMv8.0/A64,A32
-

* * ``Kokkos_ARCH_SPR``
* Optimize for Sapphire Rapids architecture
* ``OFF``
.. list-table:: IBM CPU architectures
:widths: 30 30 30
:header-rows: 1
:align: left

* * ``Kokkos_ARCH_ZEN``
* Optimize for Zen architecture
* ``OFF``
* - CMake keyword
- Architecture/Instruction set
- Examples

* * ``Kokkos_ARCH_ZEN2``
* Optimize for Zen2 architecture
* ``OFF``
* - ``Kokkos_ARCH_POWER9``
- Power9/Power ISA
- POWER9 @ ORNL Summit
POWER9 @ LLNL Sierra

* * ``Kokkos_ARCH_ZEN3``
* Optimize for Zen3 architecture
* ``OFF``
* - ``Kokkos_ARCH_POWER8``
- Power8/Power ISA
-

.. list-table:: Intel CPU architectures
:widths: 30 30 30
:header-rows: 1
:align: left

* - CMake keyword
- Architecture/Instruction set
- Examples

* - ``Kokkos_ARCH_SPR``
- Sapphire Rapids/x86-64
- Xeon 9470C @ ANL Aurora
Xeon @ LANL Crossroads

* - ``Kokkos_ARCH_SKX``
- Skylake/x86-64
- 6130 @ OSU Pete

* - ``Kokkos_ARCH_HSW``
- Haswell/x86-64
- 2680v3 @ NASA Pleiades

* - ``Kokkos_ARCH_BDW``
- Broadwell/x86-64
- 2680v4 @ NASA Pleiades

* - ``Kokkos_ARCH_KNL``
- Knights Landing/x86-64
- 31S1P @ Tianhe-2

* - ``Kokkos_ARCH_KNC``
- Knights Corner/x86-64
-

* - ``Kokkos_ARCH_SNB``
- Sandy Bridge/x86-64
-

GPU Architectures
-----------------
Expand Down
Loading