已合并
Conv:AscendC Api整改 #9114
高维健创建于 8 天前
Conv:AscendC Api整改 #9114
已合并
高维健创建于 8 天前
高维健
高维健成员
8 天前

描述

将卷积正向内使用的AscendC接口整改为兼容性变更后的新接口

关联的Issue

#5119

测试

组件用例验证通过

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 高维健 的贡献)
高维健高维健成员
8 天前 创建了 pull request,commit 5176a3f2
atomgit-bot
atomgit-bot
8 天前 评论:

变更摘要

本 PR 主要对 Conv 系列算子(convconv2d_v2conv3d_v2 的 arch35 实现)进行 AscendC API 整改:将原基于 __VEC_SCOPE__ + MicroAPI 的向量指令写法迁移到新的 Reg:: SIMD 接口(__simd_vf__/__simd_callee__),同时完成两类类型改名(FixpipeParamsC310FixpipeParamsArch3510MultiCopyParamsNdDmaParams),并把权重的 ND2NZ/分形(Fractal Z)转置逻辑抽取为公共向量函数助手放入新增文件 conv_instr_nd2nz_vf.h 中统一复用。

主要改动

  • 新增公共向量函数头文件 conv_instr_nd2nz_vf.h:定义了 TransND2NZVfParamsTransND2NZKdVfParamsTransFractalZVfParams 参数结构体以及 SetIndexVfGatherStoreNzTransND2NZVfTransND2NZKdVfTransFractalZVf__simd_vf__ 函数,封装基于 Reg::Gather/Reg::StoreAlign 的 ND2NZ 与分形转置逻辑,供卷积权重转置 kernel 共享。
  • conv 权重转置逻辑改写为新 APIconv_instr_opt_group_impl.hTransNCHW2NZTransNCDHW2NZTransNDHWC2NZTransNHWC2NZ__VEC_SCOPE__/MicroAPI 内联实现改为填充参数结构体并调用 TransND2NZVf/TransND2NZKdVf,公共参数由新增的 FillCommonNd2NzParams 统一填充;conv2d_v2_instr_c04_impl.hconv2d_v2_instr_weight_ub_trans_impl.h 分别改用 TransFractalZVfTransND2NZVf,索引生成统一复用 SetIndexVf
  • 类型改名 FixpipeParamsC310FixpipeParamsArch3510:涉及 conv_instr_hw_mode_impl.hconv_instr_m_mode_impl.hconv2d_small_kernel.hconv2d_v2_depthwise_simplify.hconv3d_v2_instr_dequant_impl.h 中的 Fixpipe 参数声明(含 SetFixpipeIntriParamsSetBaseParamsExtendConv2DFixpipe 等接口),对齐 Arch3510 平台命名。
  • 类型改名 MultiCopyParamsNdDmaParams:涉及 conv_instr_opt_group_impl.hconv2d_v2_depthwise_simplify.hconv2d_v2_instr_c04_impl.hconv2d_v2_instr_dma_impl.hconv2d_v2_instr_weight_ub_trans_impl.h 中的 DMA 拷贝参数成员声明。
  • depthwise 向量助手与内存空间标注调整conv2d_v2_depthwise_simplify.h 新增 depthwise 专用 DwSetIndexVfDwTransND2NZVf 助手并将原有转置/索引生成改写为新 API;同时各转置路径中索引与数据指针的内存空间标注由 __local_mem__ 改为 __ubuf__,并对齐文件末尾换行格式。
likedislike
atomgit-bot
atomgit-bot
8 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
8 天前 添加了label:cann-cla/yes
高维健
高维健成员
8 天前 评论:

compile

likedislike
CANN-robot
CANN-robot成员
8 天前 评论:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to 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
conv 王慈孟, 唐玮玮 (2/2) 王慈孟 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
8 天前 评论:

CLA Signature Pass

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

likedislike
高维健高维健成员
8 天前 update merge request[project id: 7665709, iid: 9114, commit_id: a52d6ca624e53f416a4b25b16992ce13999ccd10] virtual merging success
CANN-robotCANN-robot成员
8 天前 将zengjuan,cheng_gao,chaotang233,crystalhu,yangyang016,fanqirui,chenqi317,lileizheng,liubo75,LiuZonggu,tangweiwei2,pingchuantang,wangcimeng,huafeng793,linruihan,shenchengzong,yuxin5设为评审人
CANN-robotCANN-robot成员
8 天前 将cheng_gao,lileizheng,LiuZonggu,wangcimeng,huafeng793,linruihan,shenchengzong,yuxin5设为审查人
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ❌ FAILED >>>>>
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_Ascend_X86_mobile_station_ubuntu24 ❌ FAILED >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ❌ FAILED >>>>>
likedislike
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-24 20:00:03]    CI执行结束

likedislike
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-failed
高维健
高维健成员
8 天前 评论:

compile

likedislike
高维健高维健成员
8 天前 update merge request[project id: 7665709, iid: 9114, commit_id: 0b54da83ecf145bfe67bc623fed0858c32a62607] virtual merging success
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
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_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ✅ SUCCESS >>>>>

[2026-08-25 09:53:54]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8 天前 评论:

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

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-25 09:33:54]    CI执行结束

likedislike
CANN-robotCANN-robot成员
8 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-passed
lileizheng成员
8 天前 评论:

/reject

likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:10:26Start_PipelineMR_420
likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:13:15Sync_PR :white_check_mark: 成功Ic9773722dceb98959db0323e2f74e9e7eec7e4c3
likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:13:40Trigger_SC :white_check_mark: 触发成功Ic9773722dceb98959db0323e2f74e9e7eec7e4c320260825_101833586
likedislike
tangweiwei2成员
8 天前 评论:

/lgtm

likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:41:09SC_Result :x: 失败Ic9773722dceb98959db0323e2f74e9e7eec7e4c3
likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:42:39CMETRICS :white_check_mark: 成功Ic9773722dceb98959db0323e2f74e9e7eec7e4c3
likedislike
conv2d_ci
8 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 10:42:59Trigger_RDV :white_check_mark: 触发成功Ic9773722dceb98959db0323e2f74e9e7eec7e4c320260825_104752547
likedislike
conv2d_ci
7 天前 评论:
pipeline history
TimeNameResultChangeidTimeStamp
2026-08-25 14:17:56commit2026-08-24T19:53:42+08:00fb1992a1
SC_Result :x: FAILUREIc977372
RDV_Result :x: RUNNINGIc977372
本次未执行的rdv任务为
序号任务名未执行理由
1Smoke_1911mdc切换至br_feature_pegasus_v100r003c10b770_main
2rdv_tbe_1971_02None
3rdv_tbe_1911rc_01暂时下线
4Smoke_nano暂无用例
5rdv_tbe_1952_01None
6David该组的RDV疑似不需要运行:[rdv_tbe_david_01, rdv_tbe_david_02, rdv_tbe_david_03]
7transpose该组的RDV疑似不需要运行:[Davinci_RDV_conv_back_V121, conv_backward_1982_rdv, conv_backward_1971_rdv, conv_transpose_1952_rdv]
likedislike
高维健高维健成员
7 天前 修改了pull request 的描述
高维健高维健成员
7 天前 修改了pull request 的描述
高维健高维健成员
7 天前 修改了pull request 的描述
高维健高维健成员
7 天前 修改了pull request 的描述
wangcimeng成员
7 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:lgtmapproved
CANN-robotCANN-robot成员
7 天前 关闭了关联的issue
CANN-robotCANN-robot成员
7 天前 合入了pull request