Pull Request已成功合入, 合并人@CANN-robot
(感谢 ww-blue 的贡献)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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| */*/README.md | ✅ 吴瑶, 杨阳 (2/2) | ✅ 吴瑶 (1/1) |
| ** | ✅ gcw_kUomxQ2l, 杨阳 (2/2) | ✅ gcw_kUomxQ2l (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ww-blue, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


流水线任务触发成功
任务链接 [002a64d3d8ca449e8588842ad94b8d76][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_harmony-infer-chs-nn | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-07-03 11:02:15] CI执行结束


流水线任务触发成功
任务链接 [9d576610127a46c2a4028e1f61648f8d][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| SCA | ✅ SUCCESS | >>>>> |
[2026-07-03 10:57:50] CI执行结束


代码审查
审查总结
我已完成对 matmul/matmul_compress/README.md 变更的审查。该文件是一个新增的算子接口说明文档(+85 行),对应 Issue #3699。
| 文件 | 审查结果 |
|---|---|
matmul/matmul_compress/README.md |
发现 2 个问题 |
发现问题统计
| 优先级 | 数量 | 说明 |
|---|---|---|
| P0 | 0 | — |
| P1 | 1 | x2 参数数据类型 FLOAT16 应为 INT8,用户按文档传参会触发运行时校验失败 |
| P2 | 1 | "所有输入张量不支持非连续Tensor" 与实际代码行为和详细 API 文档矛盾 |
| P3 | 0 | — |
整体风险评估
中等风险。P1 发现会导致用户按照 README 传入 FLOAT16 类型的 x2 时直接命中 ACLNN_ERR_PARAM_INVALID 错误,算子调用失败。P2 发现会误导用户对非连续 Tensor 的支持情况产生错误理解。两个问题均需要在合入前修正。
| 类型 | 数量 |
|---|---|
| 🔴 阻塞 | 1 |
| 🟡 建议 | 1 |
⛔ 需要修改


🟠 High Priority
README 第 55 行将 x2(压缩后的右矩阵数据)的数据类型标注为 FLOAT16,但代码实现中 x2 的数据类型在所有层级均被定义为 INT8:
matmul_compress_def.cpp第 31 行:Input("B")定义为DataType({ge::DT_INT8})aclnn_matmul_compress.cpp第 26 行:X2_DTYPE_SUPPORT_LIST = {DataType::DT_INT8},运行时校验 weight 必须为 INT8matmul_compress.h第 70 行:kernel 中gm_b.SetGlobalBuffer(reinterpret_cast<__gm__ int8_t *>(B)),将 B 解释为 int8_t 指针matmul_compress.h第 385 行:AscendC::GlobalTensor<int8_t> gm_b声明
失效模式:用户按照 README 传入 FLOAT16 类型的 x2,将在 CheckDtypeValid 校验时命中 ACLNN_ERR_PARAM_INVALID(错误码 161002),算子调用直接失败。压缩后的数据本质上是一维字节流,INT8 是正确的数据类型。
建议:将 x2 行(第 54-56 行)的数据类型从 FLOAT16 改为 INT8。建议同步检查详细接口文档 docs/aclnnMatmulCompress.md 中 weight 参数的数据类型(第 90 行也存在同样的问题)。


🟡 Medium Priority
README 第 84 行声明"所有输入张量不支持非连续的Tensor",但该约束与实际代码行为和详细 API 文档均矛盾:
matmul_compress_def.cpp第 28-46 行:所有输入(A/B/bias/compress_index)均调用了.AutoContiguous(),GE 框架会自动将非连续 Tensor 转为连续后再传给算子aclnn_matmul_compress.cpp第 143 行:bias = l0op::Contiguous(bias, uniqueExecutor.get())— API 实现层显式处理 bias 的连续性转换aclnn_matmul_compress.cpp第 156 行注释明确写道:"out可能是非连续的tensor"- 详细 API 文档
aclnnMatmulCompress.md第 83/93/103/113 行:"非连续tensor" 列对 x/weight/bias/compressIndex 均标注为 √(支持)
失效模式:用户可能被误导,在调用前进行不必要的手动连续性转换,增加额外开发工作和性能开销。更严重的是,用户看到该约束后可能认为非连续 Tensor 完全不可用,从而对输入数据的组织方式产生错误理解。
建议:将第 84 行改为与详细 API 文档一致的说明:所有输入张量均支持非连续 Tensor(框架通过 AutoContiguous 机制自动处理连续性转换)。或直接删除该行,因为这是框架自动处理的细节,对用户并非硬性约束。


compile


流水线任务触发成功
任务链接 [cd1fd464f7564117a9b57599d1da6145][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Pre | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_harmony-infer-chs-nn | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-07-03 11:38:14] CI执行结束


流水线任务触发成功
任务链接 [e6697a26108e47d39d4cb7812acab5b1][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_checkpr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| SCA | ✅ SUCCESS | >>>>> |
[2026-07-03 11:31:41] CI执行结束


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
唐超


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
唐超


/lgtm
/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
唐超


Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


描述
补充 matmulCompress Readme文档
关联的Issue
关联Issue #3699
测试
文档更新
matmul/matmul_compress/README.md
类型标签
AI/Agent生成声明