Merged
修复CCE指令参数传输错误的问题 #4379
leozjrAdd on Jul 15
修复CCE指令参数传输错误的问题 #4379
Merged
leozjrAdd on Jul 15
Merged fromDeleted :fix/cce-param-9.1.0intocann/asc-devkit9.1.0
leozjr
leozjrCollaborators
Jul 15

描述

修复 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

测试

文档更新

无

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for leozjr's contribution.)
leozjrleozjrCollaborators
Jul 15 Created pull request, commit 32ba2873
atomgit-bot
atomgit-bot
Jul 15 Comments:

变更摘要

此 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 参数类型。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Jul 15 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Jul 15 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

CLA Signature Pass

leozjr, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
CANN-robotCANN-robotCollaborators
Jul 15 Set zengjuan,zhanghao_0689,suqwe,wulinyu,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,yangbinhua,zhudi22,chenyiyuan,xun_zhuge,XuebinYang,sjtulxh,bianque,houyuyang,Lycheeeee,chentianyu19,shi_nanxiang,wuyang_hw,jiangxinyu3,munanhw,ai_xin,ascendhjh,hujiawen_kaven,wangxiaozhi,DragonBornHD84,jiangtao_rts,hyolee,yukangchen,hanxiaolong,gcw_kUomxQ2l,Andy-lb as approver
CANN-robotCANN-robotCollaborators
Jul 15 Set munanhw,ai_xin,jiangtao_rts,hanxiaolong,gcw_kUomxQ2l,Andy-lb as approver
leozjr
leozjrCollaborators
Jul 15 Comments:

compile

likedislike
leozjrleozjrCollaborators
Jul 15 Pre merge succeeded (commit_id: e72bb4d3cabc50f31fc8783d591f28ab71f7c26d)
gao_dafaCollaborators
Jul 15 Comments:

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的社区贡献。

likedislike
CANN-robotCANN-robotCollaborators
Jul 15 Added label: ci-pipeline-running
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [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执行结束

likedislike
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [05187f8209114fb88a72cb97de744d53][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>

[2026-07-15 12:14:21]    CI执行结束

likedislike
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [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
likedislike
CANN-robotCANN-robotCollaborators
Jul 15 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Jul 15 Added label: ci-pipeline-failed
leozjrleozjrCollaborators
Jul 15 Pre merge succeeded (commit_id: 7da422d574aeff039c0657ab504d3e8724f7a1f6)
leozjrleozjrCollaborators
Jul 15 Force-pushed 1 commits:5512fd64-修复CCE指令参数传输错误的问题
leozjrleozjrCollaborators
Jul 15 Pre merge succeeded (commit_id: 0c5ea5a2ed0385f79dd9e26adf35a99c9386f26d)
leozjr
leozjrCollaborators
Jul 15 Comments:

compile

likedislike
leozjrleozjrCollaborators
Jul 15 Pre merge succeeded (commit_id: cfd70a1e094f41ae321a8d3fa6bf8d659e890373)
CANN-robotCANN-robotCollaborators
Jul 15 Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
Jul 15 Added label: ci-pipeline-running
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [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执行结束

likedislike
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [d1030d6e5dd74f3cb805cc1be748ca49][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>

[2026-07-15 14:33:39]    CI执行结束

likedislike
CANN-robot
CANN-robotCollaborators
Jul 15 Comments:

流水线任务触发成功
任务链接 [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执行结束

likedislike
leozjrleozjrCollaborators
Jul 15 Modify description of pull request
CANN-robotCANN-robotCollaborators
Jul 15 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Jul 15 Added label: ci-pipeline-passed
liulun0308Collaborators
Jul 16 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Jul 16 Added label: approved
吴洋Collaborators
Jul 16 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Jul 16 Added label: lgtm
CANN-robotCANN-robotCollaborators
Jul 16 Merged pull request