Merged
feat: arg_max_v2/arg_max_with_value/arg_min/arg_min_with_value 适配 ascend960dt #5787
jzj007Add on Sep 18
feat: arg_max_v2/arg_max_with_value/arg_min/arg_min_with_value 适配 ascend960dt #5787
Merged
jzj007Add on Sep 18
jzj007
jzj007
Sep 18

描述

为 diag、arg_max_v2、arg_max_with_value、arg_min、arg_min_with_value 五个算子新增 ascend960dt 芯片平台适配,使其可在 ascend960dt(arch35)上完成算子定义注册、tiling 编译与二进制 kernel 配置生成。

改动原因

算子 v121 分支合入主线,并为上述 5 个算子补齐 ascend960dt 平台支持。

改动方法

  1. 各算子 CMakeLists.txt 的 SUPPORT_COMPUTE_UNIT 新增 ascend960dt,SUPPORT_TILING_DIR 对应追加 arch35,复用 arch35 tiling 实现。
  2. 各算子 op_host/*_def.cpp 增加 this->AICore().AddConfig("ascend960dt", aicore_config),完成 AICore 配置注册。
  3. 新增 op_host/config/ascend960dt/ 目录,包含 {op}_binary.json(二进制 kernel 配置)与 {op}_simplified_key.ini(simplified_key_mode 配置,default=0)。
  4. scripts/kernel/binary_config/ascendc_config.json 为 Diag/ArgMaxWithValue/ArgMaxV2/ArgMinWithValue/ArgMin 增加 ascend960dt compute_units,并配置编译选项 -mllvm -cce-aicore-dcci-before-kernel-end=false。
  5. math/arg_min/framework/argmin_onnx_plugin.cpp 的 IsRegBasePlatform() 将 NpuArch::DAV_9201 加入 regbase 架构集合。

变更文件

  • conversion/diag:CMakeLists.txt、op_host/diag_def.cpp、新增 config/ascend960dt/{diag_binary.json, diag_simplified_key.ini}
  • math/arg_max_v2:CMakeLists.txt、op_host/arg_max_v2_def.cpp、新增 config/ascend960dt/{arg_max_v2_binary.json, arg_max_v2_simplified_key.ini}
  • math/arg_max_with_value:CMakeLists.txt、op_host/arg_max_with_value_def.cpp、新增 config/ascend960dt/{arg_max_with_value_binary.json, arg_max_with_value_simplified_key.ini}
  • math/arg_min:CMakeLists.txt、framework/argmin_onnx_plugin.cpp、op_host/arg_min_def.cpp、新增 config/ascend960dt/{arg_min_binary.json, arg_min_simplified_key.ini}
  • math/arg_min_with_value:CMakeLists.txt、op_host/arg_min_with_value_def.cpp、新增 config/ascend960dt/{arg_min_with_value_binary.json, arg_min_with_value_simplified_key.ini}
  • scripts/kernel/binary_config/ascendc_config.json

关联的Issue

测试

本次改动为芯片平台适配(CMake 编译配置、算子定义注册、binary/simplified_key 配置),未修改 kernel 计算逻辑,复用 arch35 tiling 与 kernel 实现。需在 ascend960dt 环境完成编译及算子泛化、二级冒烟验证。

文档更新

无

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for jzj007's contribution.)
jzj007jzj007
Sep 18 Created pull request, commit e251abfc
CANN-robotCANN-robotCollaborators
Sep 18 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Sep 18 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.
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
*/*/op_host/*_def.cpp ✅ 汤磊, 汤平川, 王瑞 (3/2) ✅ 汤磊 (1/1)
math/arg_max_v2 ✅ 汤平川, 王瑞 (2/2) ✅ 汤平川, 王瑞 (2/1)
math/arg_max_with_value ✅ 王瑞, 汤平川 (2/2) ✅ 王瑞, 汤平川 (2/1)
math/arg_min ✅ 汤平川, 王瑞 (2/2) ✅ 汤平川, 王瑞 (2/1)
math/arg_min_with_value ✅ 汤平川, 王瑞 (2/2) ✅ 汤平川, 王瑞 (2/1)
repo-cann/ops-math ✅ 汤平川, 王瑞 (2/2) ✅ 汤平川, 王瑞 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 18 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,zhanw_coding as approver
CANN-robotCANN-robotCollaborators
Sep 18 Set FelixTang7,yue-ma,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,xuejinghui,zhanw_coding as approver
131 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
19 days ago Added label: approved
CANN-robot
CANN-robotCollaborators
19 days ago Comments:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
Hhuangyuqian
19 days ago Resolved final issue
CANN-robotCANN-robotCollaborators
19 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
19 days ago Merged pull request