已关闭
[Requirement|需求建议]: WeightQuantPreprocess 新增 A16W4(INT4/FP4/MXFP4)紧凑排布数据流支持 #2851
马琦钧创建于 19 天前关闭于 17 天前
19 天前 关联了pull request:docs: weight_quant_preprocess 补充 A16W4 数据流文档与 example
CANN-robot
19 天前 评论:
19 天前 评论:
17 天前 关闭了 issue
17 天前 添加了label:resolved


Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
一、背景信息 (必填)
WeightQuantBatchMatmulV2 在 Ascend950 上新增 A16W4(INT4/FP4/MXFP4)4-bit 紧凑排布(uint8 载体)weight 支持(ops-nn 侧:cann/ops-nn#8545),需要 WeightQuantPreprocess 算子配套支持对应的预处理数据流。当前该算子仅支持 MX A8W4 / int8 等存量流程,不支持 A16S4(INT4 per-tensor/per-channel/per-group)与 A16F4(FP4 per-group/MX)的 4-bit 紧凑 weight 预处理。
二、价值/作用 (必填)
补齐 A16W4 紧凑排布 weight 的预处理通路,使 Ascend950 上 A16S4/A16F4 场景可以经 preprocess 完成 ND→NZ_C0_16 转换或 ND 直拷,支撑 wqbmmv2 的 4-bit 紧凑 weight 输入,降低 weight 显存占用与搬运带宽。
三、设计方案 (必填)
3.1 使能方式(涉及哪些框架:如Aclnn直调、Pytorch训练等)
npu_weight_quant_preprocess(经 op-plugin,见 Ascend/op-plugin#5676,对应 issue Ascend/pytorch#4358)3.2 总体设计
3.2.1 算子支持的数据类型
3.2.2 host侧设计
3.2.3 kernel侧设计
3.3 支持硬件
Ascend950
对应 PR:https://gitcode.com/cann/ops-math/pulls/4495