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 designed to work on matrices to accelerate artificial intelligence (AI) and machine learning (ML) workloads. They perform matrix multiplication at the hardware level, making them apt for problems and algorithms that use matrix multiplication as their core.
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 ). Intel's instruction set reference also documents AMX-FP8, which adds tile dot-product instructions for 8-bit floating-point numbers, as a feature of the future Diamond Rapids server processors. The x86 Ecosystem Advisory Group, formed by Intel and AMD in 2024, has specified AI Compute Extensions (ACE), a matrix multiplication extension intended for processors from both companies.
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 of up to 16 rows of 64 bytes each (32 BF16/FP16 or 64 INT8 elements per row), and software sets the active rows and row widths with the LDTILECFG instruction. The only supported operation is matrix multiply and accumulate (MMA), which is the extension of the fused multiply–add (FMA) operation for scalar values as applied to matrix operands: Cnm=Cnm+∑j=1JAnjBjm. 4th Gen Intel Xeon Scalable processor core can perform 2048 INT8 or 1024 BF16 operations per cycle: the maximal input sizes are 16×J for A and J×16 for B, where J is 64 for INT8 and 32 for BF16. Consecutive elements of B along the shared dimension are packed into 32-bit groups, pairs of BF16 or quads of INT8 values, as in the AVX-512 VNNI instructions, so libraries usually repack B before multiplying. The matrix multiplication requires 256J multiplication and 256J additions, thus performing 512J operations in 16 cycles.
Software support Libraries: oneDNN, through which PyTorch uses AMX on Xeon processors, and Intel oneMKL. OpenBLAS uses AMX tiles in its bfloat16 GEMM kernel for Sapphire Rapids. Compiler and assembler support LLVM 13 GCC 11 GNU Assembler (GAS) initial support committed on 25 June 2020 Operating system support glibc support for detecting AMX feature in CPUs committed on 25 June 2020 Linux kernel support since version 5.16 A process must request permission for the AMX tile state through arch_prctl before using the instructions. VMware vSphere support for AMX in virtual machines released in ESXi version 8.0u1 for VMs using Hardware Version 20
References
External links Intel Intrinsics Guide Wikichip: Advanced Matrix Extension (AMX) - x86