已合并
在 experimental 中新增 Ascend950 FP4/FP8 量化矩阵乘 #791
Chen_HaoWen创建于 7月1日
在 experimental 中新增 Ascend950 FP4/FP8 量化矩阵乘 #791
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Chen_HaoWen 的贡献)7月1日 添加了label:cann-cla/yes
CANN-robot
7月1日 评论:
7月1日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/catlass | ✅ sunhao_hw, longjihui (2/2) | ✅ sunhao_hw (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
Chen_HaoWen, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Chen_HaoWen
7月1日 评论:
7月1日 评论:
compile


7月1日 添加了label:ci-pipeline-running
CANN-robot
7月1日 评论:
7月1日 评论:
文档检查门禁结果:


此处折叠了316条消息 查看更多
20 天前 添加了label:lgtmapproved
Chen_HaoWen
20 天前 评论:
20 天前 评论:
/check-pr


20 天前 关闭了关联的issue
20 天前 合入了pull request
描述
接入 Ascend950 FP4 MX 量化矩阵乘和 FP8 E4M3 量化矩阵乘,提供公共模板、torch_catlass 接口及 optest。修复输入 storage offset、MX B scale 布局,以及 FP8 单行和末尾单行 tile 的同步问题;补充异常参数检查和失败返回码。
两个样例分别放在
experimental/matmul/ascend950_fp4_mx_quant_matmul/和experimental/matmul/ascend950_fp8_e4m3_quant_matmul/,样例目录及构建目标不带编号。使用前按 README 拷回examples/并注册 CMake 目标;optest 测试件随样例移动,保留 test_85/test_86 文件名及现有 torch/JIT 接口。PR 保持一个 commit。关联的Issue
Closes #283
对应 Issue #283。
原因
完成两个 Ascend950 量化矩阵乘算子的接入,解决接口、数据布局和单行同步问题,并补齐模型场景及边界泛化验证。样例归入 experimental 分类目录,由用户按说明选择编译运行。
测试
测试脚本已通过 catlass-test-scripts PR #83 合入;后续 PR #89 仅修正 4 处源码路径说明。每个 ATK 目录仍为 YAML、generator、execute 和 node.yaml 四件套。
环境:A5 / Ascend950、CANN 9.1.0、ATK 26.9.8、torch 2.10.0、torch_npu 2.10.0;本轮被测源码
2e05d8bb0e1dcebb970df0320b38a4290289e75f。mixed_tolerance_bm: {},无自定义阈值。每个算子 100 个不同形状×均匀/正态两种分布,固定种子;M≤4097、K≤2048、N≤4096,覆盖单行、tile 尾块、分组边界及模型场景。生成结果与固定快照逐字节一致,逐例核对正式报告及 CPU/NPU 保存输出。ba2d303a的实测证据,本轮未重复这些专项检测。2e05d8bb的 PR-pipeline_catlass #3418 全部启用任务通过,覆盖编译构建、静态检查、ARM/IR/lit 单测;平台标签ci-pipeline-passed。完整测试证据及专项工具保存在本地,ATK 仓未新增 stress、reports 或专项 tools。
文档更新
更新两个 experimental 样例的 README:第三行增加拷回 examples 的说明,修正目录树、编译/数据生成/执行命令及相对链接,补充迁移后 optest 测试入口;同步 torch 接口的源码位置说明。
类型标签