利用 SplitK 工作分解加速面向 W4A16 量化推理的 Triton 融合内核
Accelerating a Triton Fused Kernel for W4A16 Quantized Inference with SplitK work decomposition
AI总结:
本文提出一种基于 SplitK 工作分解的 Triton 融合内核,将反量化与 GEMM 融合执行,面向 W4A16 量化推理中的瘦长矩阵乘法,在 A100 和 H100 上分别取得平均 65% 和 124% 的加速。
摘要:
我们提出了一种面向 W4A16 量化推理的高效融合矩阵乘法内核实现,在该实现中,我们使用 SplitK 工作分解在融合内核中同时执行反量化与 GEMM。我们的实现针对基础模型推理工作负载中常见的一类瘦长型矩阵-矩阵乘法展现出性能改进。具体而言,本文考察了瘦长激活矩阵与方阵权重矩阵之间的矩阵乘法类型。实验结果表明,在包括 llama 风格模型中出现的矩阵维度(其中 m < n = k)在内的一系列矩阵维度上,A100 上平均实现 65% 的速度提升,H100 上平均实现 124% 的速度提升(峰值达 295%)。
英文摘要:
We propose an implementation of an efficient fused matrix multiplication kernel for W4A16 quantized inference, where we perform dequantization and GEMM in a fused kernel using a SplitK work decomposition. Our implementation shows improvement for the type of skinny matrix-matrix multiplications found in foundation model inference workloads. In particular, this paper surveys the type of matrix multiplication between a skinny activation matrix and a square weight matrix. Our results show an average of 65% speed improvement on A100, and an average of 124% speed improvement on H100 (with a peak of 295%) for a range of matrix dimensions including those found in a llama-style model, where m < n = k.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。