Pull Request已成功合入, 合并人@CANN-robot
(感谢 tangweiwei2 的贡献)变更摘要
该 PR 对 matmul_recipes 目录下的 MX 量化矩阵乘算子进行了纯命名重构:将用于 MX 格式(MXFP8/MXFP4)矩阵乘算子的 QuantMatmulTilingData 统一重命名为 QuantMatmulMxTilingData,以避免与 INT8、HiFP8 等其他量化类型的 TilingData 命名混淆,并与现有 quant_matmul_mx_tiling_*.h 文件命名保持一致。改动覆盖 14 个文件、28 处引用,均为文本替换,不涉及逻辑变更。
主要改动
- 结构体定义重命名: 在
quant_matmul_tiling_data.h中将struct alignas(8) QuantMatmulTilingData重命名为struct alignas(8) QuantMatmulMxTilingData,字段布局与 host-device 契约保持不变。 - 基类接口签名同步更新: 在
quant_matmul_tiling_base.h中,GetTilingData的两个重载、纯虚函数DoOpTiling以及私有方法PrintTilingData的参数类型均由QuantMatmulTilingData更新为QuantMatmulMxTilingData。 - 派生 Tiling 类 override 更新:
quant_matmul_mx_tiling_a_full_load.h、quant_matmul_mx_tiling_swat.h、quant_matmul_mx_tiling_swat_4_buffer.h中的DoOpTiling和BuildTilingData参数类型同步替换为QuantMatmulMxTilingData。 - 示例算子文件更新: mxfp4 与 mxfp8 的
a_full_load、swat、swat_4_buffer、swat_weight_nz等.asc示例中,kernel 形参类型及tilingData局部变量声明均替换为QuantMatmulMxTilingData。 - 注释同步:
common_utils.h中CheckUint32Shape附近的注释由QuantMatmulTilingData更新为QuantMatmulMxTilingData,与实际结构体命名保持一致。


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
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/cann-samples | ✅ 杨阳, zhangzijie (2/2) | ✅ 杨阳, zhangzijie (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
tangweiwei2, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


流水线任务触发成功
任务链接 [3abb6bf9f61a46a0a45465f538bd2154][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Check_pr | ✅ SUCCESS | ||
| Compile_Ascend_X86_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| codecheck_codestyle | ⚠️ WARNING | >>>>> | |
| precommit | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> |
[2026-08-13 21:40:12] CI执行结束


【建议】本次重命名的目的是明确该 TilingData 仅适用于 MX,并避免与其他量化类型混淆;但类型改为 QuantMatmulMxTilingData 后,定义文件仍保留泛化名称 quant_matmul_tiling_data.h,文件中的 \file 和 brief 也没有体现 MX 范围。
同目录已有 quant_matmul_hifp8_tiling_data.h 对应 QuantMatmulHifp8TilingData、weight_quant_matmul_mxfp8fp4_tiling_data.h 对应 WeightQuantMatmulMxfp8Fp4TilingData。建议同步将本文件重命名为 quant_matmul_mx_tiling_data.h,并更新相关 include 及文件说明,避免后续增加其他 QuantMatmul TilingData 时仍在文件层面产生歧义。


/compile


流水线任务触发成功
任务链接 [122163315c97457d999249f189b1a83a][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Check_pr | ✅ SUCCESS | ||
| Compile_Ascend_X86_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| codecheck_codestyle | ⚠️ WARNING | >>>>> | |
| precommit | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> |
[2026-08-14 16:27:01] CI执行结束


/lgtm
/approve


/lgtm
/approve


The MR can not be merged, because of CodeReview discussion not resolved
If you want to solve this problem, you can click here to do it in the FAQs.


描述
将
matmul_recipes目录下 MX 量化矩阵乘算子使用的QuantMatmulTilingData重命名为QuantMatmulMxTilingData。该 TilingData 结构体仅用于 MX 量化格式(MXFP8/MXFP4)的矩阵乘算子,原命名
QuantMatmulTilingData过于宽泛,容易与 INT8、HiFP8 等其他量化类型的 TilingData 混淆。新命名QuantMatmulMxTilingData与现有文件命名quant_matmul_mx_tiling_*.h保持一致。涉及 14 个文件共 28 处引用,均为纯文本替换,不涉及逻辑变更。
关联的Issue
关联Issue #264
测试
使用 CANN 9.1.0 toolkit(dav-3510 架构)编译验证通过:
全仓库搜索确认
QuantMatmulTilingData无残留。文档更新
不涉及文档更新。
类型标签