已合并
refactor: 移除多个算子 tiling 文件中冗余的 tiling_util.h 头文件引用 #2962
songkai111创建于 5月26日
refactor: 移除多个算子 tiling 文件中冗余的 tiling_util.h 头文件引用 #2962
已合并
songkai111创建于 5月26日
songkai111成员
5月26日

描述

本 PR 对多个算子的 tiling 代码进行头文件引用清理和代码格式化,移除不再需要的 op_host/tiling_util.h 引用,统一代码风格。

改动原因

  • 多个算子的 tiling 文件中仍残留 #include "op_host/tiling_util.h" 头文件引用,该头文件已不再被使用,属于冗余依赖
  • 部分文件的代码格式不统一(行宽、缩进等),需要进行格式化对齐

改动方法

  1. 移除冗余头文件:在以下 24 个算子的 tiling 文件中移除 #include "op_host/tiling_util.h"

    • axpy_v2, bitwise_and, diag_part, equal, erf, floor, nan_to_num, pow, pow2, real, real_div, reciprocal, reduce_max_v2, reduce_min_v2, reduce_sum_v2, round, rsqrt, rsqrt_grad, select_v2, sign, sign_bits_pack, sign_bits_unpack, sqrt, tanh_grad
  2. equal 算子:额外移除 #include "op_host/tiling_templates_registry.h",替换为 register/op_impl_registry.htiling/platform/platform_ascendc.hgraph/utils/type_utils.h

  3. real 算子:在移除冗余头文件的基础上,进行代码格式化调整,统一行宽和缩进风格

  4. CI 脚本(scripts/ci/gen_ci_cmd.py):将 experimental 算子的 CI example 命令生成逻辑从"使用默认算子"改为直接跳过,避免生成无效的测试命令

关联的Issue

  • #1666

测试

编译验证通过,移除未使用的头文件不影响功能。

文档更新

类型标签

  • Bug修复
  • 新特性
  • 性能优化
  • 文档更新
  • 其他,请描述:代码重构 - 移除冗余头文件引用和代码格式化
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)
Ssongkai111成员
5月26日 创建了 pull request,commit 6ab445bb
CANN-robot
CANN-robot成员
5月26日 评论:

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
experimental 张磊, wangrui_ (2/2) 张磊 (1/1)
repo-cann/ops-math 张磊, wangrui_ (2/2) 张磊 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
5月26日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
5月26日 将FelixTang7,yu-xinjie62,zhou-qilong,wangrui_,wei-peng-1991,renruhai,su-yueming,zhajianqing123,rxtfeng,luowen203_gg123,loov1,zhangzijie,jia0liang,chenqi317,liu-wei,LiuXinxin23,fullt,LiWei79,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
5月26日 将FelixTang7,yu-xinjie62,zhou-qilong,wangrui_,wei-peng-1991,renruhai,su-yueming,zhajianqing123,rxtfeng,luowen203_gg123,loov1,zhangzijie,jia0liang,chenqi317,liu-wei,LiuXinxin23,fullt,LiWei79,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为审查人
songkai111成员
5月26日 评论:

compile

likedislike
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: 1e09fa1f653c22399db51c8c22571416f510fc70] virtual merging success
CANN-robotCANN-robot成员
5月26日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ❌ FAILED >>>>>
Compile_Ascend_ARM_experimental ❌ FAILED >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ❌ FAILED >>>>>
Compile_Ascend_ARM_A5 ❌ FAILED >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ❌ FAILED >>>>>
Compile_Ascend_X86_A5_ubuntu24 ❌ FAILED >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ❌ FAILED >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ❌ FAILED >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
likedislike
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS
SCA ❌ FAILED >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ 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 ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
likedislike
CANN-robotCANN-robot成员
5月26日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5月26日 添加了label:ci-pipeline-failed
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: 94f557e519d5bb7e4da19ddddb959e9e2f955169] virtual merging success
Ssongkai111成员
5月26日 推送  1 个提交:1b8587e8-fix: 回滚 tiling_base_util.h 替换,修复 so 缺符号问题
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: b31fc6b6e5c883f82aff686d66415c0f6c17522f] virtual merging success
CANN-robotCANN-robot成员
5月26日 添加了label:stat/needs-squash
songkai111成员
5月26日 评论:

compile

likedislike
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: a52d2cb8621af72f7a67a261613455e2f417d8c1] virtual merging success
CANN-robotCANN-robot成员
5月26日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
5月26日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ❌ FAILED >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
likedislike
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ 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 ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-05-26 18:51:43]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月26日 添加了label:api-check-pass
此处折叠了7条事件消息 查看更多
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: 36c43c475f2a7ff0144d70fe09e7debb83fe2a2e] virtual merging success
songkai111成员
5月26日 评论:

compile

likedislike
Ssongkai111成员
5月26日 update merge request[project id: 7649531, iid: 2962, commit_id: 4691f90128288822468d3077418a2547a20b6a35] virtual merging success
CANN-robotCANN-robot成员
5月26日 删除了label:ci-pipeline-failedapi-check-pass
CANN-robotCANN-robot成员
5月26日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-05-26 19:04:39]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
5月26日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ 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 ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-05-26 19:02:27]    CI执行结束

likedislike
CANN-robotCANN-robot成员
5月26日 添加了label:api-check-pass
CANN-robotCANN-robot成员
5月26日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5月26日 添加了label:ci-pipeline-passed
Ssongkai111成员
5月26日 修改标题为 “refactor: 移除多个算子 tiling 文件中冗余的 tiling_util.h 头文件引用”,原标题为“refactor: 替换 tiling_util.h 为 opbase 的 tiling_base_util.h 并适配 namespace”
Ssongkai111成员
5月26日 修改了pull request 的描述
zl_hw成员
5月26日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
5月26日 添加了label:approved
RuiWang_成员
5月26日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
5月26日 添加了label:lgtm
CANN-robot
CANN-robot成员
5月26日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: 张磊.
Reviewers who wrote a comment of /lgtm are: 张磊, wangrui_.

likedislike
CANN-robotCANN-robot成员
5月26日 关闭了关联的issue
CANN-robotCANN-robot成员
5月26日 合入了pull request