AMX 指令
Intel AMX 的 Tile 寄存器、TMUL、低精度输入与宽精度累加合同
1. BF16
其结构如下图所示:

2. AMX 的执行模型
AMX 的核心是把矩阵分块放进二维 Tile register,再由 TMUL 执行矩阵乘累加。第一代 AMX 包含 AMX-TILE、AMX-INT8 和 AMX-BF16;具体处理器支持哪些扩展,仍需通过 CPUID、操作系统和运行库核对。
- Tile register file 包含
TMM0到TMM7。 - 每个 Tile 最大为 16 行 × 64 byte = 1 KiB。
- AMX-INT8 使用 INT8 operand,并累加到 INT32。
- AMX-BF16 使用 BF16 operand,并累加到 FP32。
这体现了低精度矩阵计算的通用合同:
窄精度输入
→ 专用 tile 矩阵乘
→ 更宽精度累加
→ 高精度或目标格式输出
它与 GPU Tensor Core 的数学结构相似,但并行规模、存储层次、数据布局和 Kernel 调度不同。面向 LLM 量化的完整对照见从 AVX/AMX 到 Tensor Core。
参考资料
← 被以下页面引用(2)
- 从 AVX/AMX 到 Tensor Core:CPU 工程师理解 LLM 量化ai-systems · comparison
- OpenVinoai-systems · entity
修改历史12 次提交
- docs(wiki): bridge CPU and GPU quantizationxiaocheng··
a04dd83 - refactor(content): split architecture → cpu-gpu + linux (hidden)xiaocheng··
c425d22 - fix(wiki): clean all lint errors to enable strict CI (PR-3)xiaocheng··
9acd1f2 - refactor: reorganize documentation structure and update Navbar componentxiaocheng··
e7d22e5 - chore(project): clean up obsolete configuration and build artifactsxiaocheng··
d659171 - updatexiaocheng··
04290da - label updatexiaocheng··
1c7232f - new struct for lblogsxiaocheng··
6ea1ca2 - move blogs to docsxiaocheng··
a8edecd - updatexiaocheng··
a846398 - vault backup: 2025-07-01 10:56:12xiaocheng··
790a275