Pull Request has been successfully merged by CANN-robot.
(Thank you for leozjr's contribution.)变更摘要
此 PR 修复了 cube_datamove_impl 模块中 copy_gm_to_cbuf_v2 与 copy_matrix_cc_to_cbuf 两处 CCE 指令因调用时缺失参数而导致的参数传输错误。核心改动是在实现层调用、stub 声明及测试 mock 中补齐缺失的参数(主要为 l2_cache_ctl、loop_enhance_en、loop_enhance_merge_en、wino_post_en、broadcast_en、NZ2DN_en),使函数调用与最新 API 签名保持一致。
主要改动
asc_copy_gm2l1_impl.h中copy_gm_to_cbuf_v2调用补齐参数:在pad_func_mode与src_stride之间插入缺失的l2_cache_ctl参数(值为0),使调用参数与目标签名对齐。asc_copy_l0c2l1_impl.h中 8 个copy_matrix_cc_to_cbuf重载补齐参数:在src_stride后补0(即l2_cache_ctl),在clip_relu_post后补false(即loop_enhance_en),在eltwise_antq_en后补false(即loop_enhance_merge_en),末尾追加false, false, false(即wino_post_en、broadcast_en、NZ2DN_en),共计 25 个参数。cce_stub.h中 stub 声明同步更新:copy_gm_to_cbuf_v2声明增加l2_cache_ctl参数;新增 8 个 25 参数的copy_matrix_cc_to_cbuf重载 stub(覆盖half/int8_t/uint8_t/float/int32_t目标与float/int32_t源的类型组合)。test_asc_copy_gm2l1.cpp中测试 mock 适配:copy_gm_to_cbuf_v2_stub函数签名新增l2_cache_ctl参数并添加对应的EXPECT_EQ断言;MOCKER_CPP的 mock 签名同步增加uint8_t参数类型。


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, wuyang_hw (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
leozjr, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


leozjr,感谢您的提交,建议在完成PR充分自验证后,再触发线上构建任务。
若您的PR已具备检视条件,可根据下表的责任田,@对应的committer进行代码检视,我们会在第一时间对您的提交进行处理。
代码责任田:
| module | committer |
|---|---|
| adv_api | chenyiyuan, wuyang_hw |
| basic_api | chenyiyuan, wuyang_hw |
| c_api | pangfd, haipingmao |
| 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的社区贡献。


流水线任务触发成功
任务链接 [cc1ea259636c43158ff39fd5f150df3d][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-07-15 12:14:04] CI执行结束


流水线任务触发成功
任务链接 [3c85f1d9d1024c76afd63c97508a036e][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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 | ❌ FAILED | ||
| UT_Test_arm | ✅ SUCCESS |


compile


流水线任务触发成功
任务链接 [15665be75d2d4e7bb0779b9986c72a80][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ⚠️ WARNING | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-07-15 14:33:49] CI执行结束


流水线任务触发成功
任务链接 [6d19ed9b59b8445da5d5e26697865143][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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-15 14:41:08] CI执行结束


/approve


描述
修复
cube_datamove_impl中copy_gm_to_cbuf_v2与copy_matrix_cc_to_cbuf调用缺失参数导致的 CCE 指令参数传输错误。具体改动:
asc_copy_gm2l1_impl.h:copy_gm_to_cbuf_v2调用补齐pad_func_mode与src_stride之间缺失的参数(补0)。asc_copy_l0c2l1_impl.h:8 个copy_matrix_cc_to_cbuf重载调用补齐缺失实参(src_stride后补0、clip_relu_post后补false、eltwise_antq_en后补false,并在末尾补false, false, false),使调用与 API 签名一致。cce_stub.h:同步更新 stub 声明,copy_gm_to_cbuf_v2加l2_cache_ctl参数,新增 8 个 25 参数的copy_matrix_cc_to_cbuf重载。test_asc_copy_gm2l1.cpp:更新 mock 签名和 stub 函数,适配新参数。tensor_api/stub/cce_stub.h:同步更新copy_gm_to_cbuf_v2声明。该修复已合入 master 分支(PR !4352),此为同步到 9.1.0 分支的 cherry-pick。
关联的Issue
测试
文档更新
无
类型标签