Pull Request已成功合入, 合并人@CANN-robot
(感谢 ruanyy 的贡献)变更摘要
此 PR 主要修复文档和示例代码中错误使用的 MatmulImpl 类名,将其统一替换为正确的 AscendC::Matmul,同时更新对应的头文件引用和编译宏定义,确保示例代码与实际 API 一致。
主要改动
- 更正 MatMul API 类名:将
AscendC::MatmulImpl<...>替换为AscendC::Matmul<...>,消除示例代码中不应出现的旧类名。 - 更新头文件引用:移除
#include "lib/matrix/matmul/matmul.h",改为#include "lib/matmul_intf.h",匹配当前库的接口头文件路径。 - 新增编译宏:在头文件包含前添加
#define ASCENDC_CUBE_ONLY,以适配仅使用 Cube 运算的 MatMul 接口编译要求。


代码审查
审查总结
本次 PR 将文档和示例代码中的 MatmulImpl 统一替换为 Matmul,并同步更新了相关的头文件引用和宏定义。逐文件审查结论如下:
| 文件 | 审查结论 |
|---|---|
CubeResGroupHandle使用说明.md |
无问题 — 仅 MatmulImpl → Matmul 一行替换 |
Matmul模板参数.md |
P3 — "函数原型"代码块仅剩 template 参数列表,缺少完整声明体 |
SetSubBlockIdx.md |
无问题 — 新增 ASCENDC_CUBE_ONLY + matmul_intf.h,替换正确 |
Matmul高阶API使能NBuffer33模板.md |
无问题 — MatmulImpl → Matmul,类型参数更新符合 MatmulType API |
基础API迁移指导.md |
无问题 — 仅 MatmulImpl → Matmul 一行替换 |
README.md(matmul_mxfp4) |
无问题 — 仅文本中 MatmulImpl → Matmul 一处替换 |
matmul_s4.asc |
无问题 — 头文件切换 + ASCENDC_CUBE_ONLY 定义位置符合文档规范 |
发现数统计:P0: 0,P1: 0,P2: 0,P3: 1。
整体风险判断:低风险。变更是一次清晰的 API 重命名(MatmulImpl → Matmul)传播到文档和示例代码,代码逻辑无改动,所有引用已全面清理(docs/ 和 examples/ 目录下已无残留的 MatmulImpl)。唯一的 P3 问题是文档展示形式上的可读性退化,不影响功能正确性。
⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。


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 |
|---|---|---|
| ** | ✅ gcw_kUomxQ2l, bluesky901 (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
ruanyy, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/approve


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


ruanyy,感谢您的提交,建议在完成PR充分自验证后,再触发线上构建任务。
若您的PR已具备检视条件,可根据下表的责任田,@对应的committer进行代码检视,我们会在第一时间对您的提交进行处理。
代码责任田:
| module | committer |
|---|---|
| adv_api | chenyiyuan, wuyang_hw |
| basic_api | chenyiyuan, wuyang_hw |
| c_api | pangfd, yue_mo_du_qian |
| cmake | xun_zhuge, DragonBornHD84 |
| docs | munanhw, ai_xin |
| examples | changxianyu, bianque |
| simt_api | wulinyu, zhanghao_0689 |
| scripts | xun_zhuge, kevin365 |
| tools | YANXI_ZHAO, XuebinYang, sjtulxh |
💡 如您不确定可以@谁,可以直接@我或者ascend-c sig的maintainer,xun_zhuge和ascendhjh,我们会为您分配合适的committer进行代码检视。
再次感谢您参与CANN的社区贡献。


/lgtm


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


流水线任务触发成功
任务链接 [cd50d9a746054274a0bb6b1d5d7a6de5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | >>>>> |
[2026-07-08 09:28:14] CI执行结束


流水线任务触发成功
任务链接 [efb2bf6b959f4a51b4496b785dc2dd07][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_adv_test_one | ✅ SUCCESS | ||
| UT_Test_adv_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_two | ✅ SUCCESS | ||
| UT_Test_basic_test_three | ✅ SUCCESS | ||
| UT_Test_basic_test_four | ✅ SUCCESS | ||
| UT_Test_basic_test_five | ✅ SUCCESS | ||
| UT_Test_arm | ✅ SUCCESS | ||
| UT_Test_report | ✅ SUCCESS | >>>>> |
[2026-07-08 09:30:53] CI执行结束


/approve


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


描述
修复代码以及文档中不应该出现的MatmulImpl
关联的Issue
测试
前冒烟测试
文档更新
类型标签