Misplaced Pages

Advanced Matrix Extensions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Extensions to the x86 instruction set architecture

Advanced Matrix Extensions (AMX), also known as Intel Advanced Matrix Extensions (Intel AMX), are extensions to the x86 instruction set architecture (ISA) for microprocessors from Intel originally designed to work on matrices to accelerate artificial intelligence (AI) and machine learning (ML) workloads. They can also be applied to optimal routing problems, graph problems, optimisation and others.

Extensions

AMX was introduced by Intel in June 2020 and first supported by Intel with the Sapphire Rapids microarchitecture for Xeon servers, released in January 2023. It introduced 2-dimensional registers called tiles upon which accelerators can perform operations. It is intended as an extensible architecture; the first accelerator implemented is called tile matrix multiply unit (TMUL).

In Intel Architecture Instruction Set Extensions and Future Features revision 46, published in September 2022, a new AMX-FP16 extension was documented. This extension adds support for half-precision floating-point numbers. In revision 48 from March 2023, AMX-COMPLEX was documented, adding support for half-precision floating-point complex numbers. Both extensions are available in the Granite Rapids set of server processors (with AMX-COMPLEX support only being available in Granite Rapids-D).

Tile matrix multiply unit

TMUL unit supports BF16 and INT8 input types. AMX-FP16 and AMX-COMPLEX also add support for real and complex FP16 numbers. The register file consists of 8 tiles, each with 16 rows of size of 64 bytes (32 BF16/FP16 or 64 INT8 elements). The only supported operation is matrix multiplication C n m + = j = 1 J A n j B j m . {\textstyle C_{nm}+=\sum _{j=1}^{J}A_{nj}B_{jm}.}

4th Gen Intel Xeon Scalable processor can perform 2048 INT8 or 1024 BF16 operations per cycle: the maximal input sizes are 16 × J {\textstyle 16\times J} for A and J × 16 {\textstyle J\times 16} for B, where J is 64 for INT8 and 32 for BF16. The matrix multiplication requires 256 J {\textstyle 256J} multiplication and 256 J {\textstyle 256J} additions, thus performing 512 J {\textstyle 512J} operations in 16 cycles.

Software support

  • Compiler and assembler support
  • Operating system support
    • glibc support for detecting AMX feature in CPUs committed on 25 June 2020
    • Linux kernel support since version 5.16
    • VMware vSphere support for AMX in virtual machines released in ESXi version 8.0u1 for VMs using Hardware Version 20

References

  1. Hemsoth, Nicole (August 19, 2021). "With AMX, Intel Adds AI/ML Sparkle to Sapphire Rapids". The Next Platform.
  2. Respondek, J.S. (2025). Fast Matrix Multiplication with Applications, Ch. 9. Studies in Big Data. Vol. 166. Springer Cham. ISBN 978-3-031-76929-0.
  3. online, heise (28 June 2020). "Intel AMX: Erste Informationen zur Advanced Matrix Extensions Architecture". heise online.
  4. Cutress, Ian. "Intel Xeon Sapphire Rapids: How To Go Monolithic with Tiles". AnandTech.
  5. ^ "Intel® Architecture Instruction Set Extensions and Future Features".
  6. Schor, David (June 29, 2020). "The x86 Advanced Matrix Extension (AMX) Brings Matrix Operations; To Debut with Sapphire Rapids".
  7. Larabel, Michael (July 12, 2023). "Intel Granite Rapids D Support Merged Into GCC 14". Phoronix.
  8. "Advanced Matrix Extension (AMX) - x86 - WikiChip". en.wikichip.org.
  9. "Accelerate Artificial Intelligence (AI) Workloads with Intel Advanced Matrix Extensions (Intel AMX)" (PDF). Intel. Retrieved 2023-04-13.
  10. ^ "Intel® 64 and IA-32 Architectures Optimization Reference Manual Volume 1". Intel.
  11. "What's New in LLVM for 4th Gen Intel® Xeon® & Max Series CPUs". Retrieved 21 April 2023.
  12. Larabel, Michael (2020-07-02). "Intel AMX Support Begins Landing In LLVM". Phoronix. Retrieved 2020-07-02.
  13. "[X86-64] Support Intel AMX instructions". GitHub. 2020-07-02. Retrieved 2020-07-02.
  14. ^ Larabel, Michael (2020-07-02). "Intel AMX Support Lands In The GNU Assembler". Phoronix. Retrieved 2020-07-02.
  15. "GCC 11 Release Series — Changes, New Features, and Fixes - GNU Project". Retrieved 21 April 2023.
  16. "[PATCH] Enable GCC support for AMX". 2020-07-06. Retrieved 2020-07-09.
  17. "Enable GCC support for AMX-TILE, AMX-INT8, AMX-BF16. · gcc-mirror/gcc@5c60984". GitHub. Retrieved 2022-09-05.
  18. "commits with Intel AMX". 2020-07-02. Retrieved 2020-07-02.
  19. "x86: Detect Intel Advanced Matrix Extensions". 2020-07-02. Retrieved 2020-07-02.
  20. "Linux 5.16 Features Include FUTEX2, Intel AMX, Folios, DG2/Alchemist, More Apple Silicon Support". Phoronix.
  21. "Accessing Sapphire Rapids AMX instructions on vSphere". Earl C. Ruby III. 2023-08-24.

External links

AMD technology
Software
Platforms
Current
Obsolete
Technology
Instructions
Intel technology
Platforms
Discontinued
Current
Upcoming
Instruction set extensions
SIMD (RISC)
SIMD (x86)
Bit manipulation
  • BMI (ABM: 2007, BMI1: 2012, BMI2: 2013, TBM: 2012)
  • ADX (2014)
Compressed instructions
Security and cryptography
Transactional memory
Virtualization
Suspended extensions' dates are struck through.
Categories: