INT8 Quantized MatMul
2026/3/9小于 1 分钟
INT8 Quantized MatMul
题面
Implement INT8 量化矩阵乘法:给定 、,量化尺度 与零点 ,按如下公式计算输出 (int8):
计算输出 C(int8)。
Implementation Requirements
- External libraries are not permitted
- The solve function signature must remain unchanged
- Accumulate in int32, scale in float32,round 最近整数,加零点并 clamp 至 [-128,127]
- The final result must be stored in int8 矩阵 C
Examples
Example 1: 见页面示例(M=N=K=2)
Example 2: 含非零零点示例Constraints
- 1 ≤ M, N, K ≤ 4096
- scale_* 为正浮点数
- -128 ≤ zero_point_* ≤ 127
- Performance is measured with K = 2,048, M = 8,192, N = 4,096