已合并
【PR】: [fix] [autofuse] move copied headers to the same dir. #4127
【PR】: [fix] [autofuse] move copied headers to the same dir. #4127
已合并
邢智雄创建于 7月24日
邢智雄
邢智雄成员
7月24日

Pull Request

描述

将autofuse目录下从graph-autofusion仓拷贝过来的头文件都汇总到一个目录下,后续等ascir标准化需求落地后可以一把删除。

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:

  1. ci流水线pass
  2. RDV pass

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 邢智雄 的贡献)
邢智雄邢智雄成员
7月24日 添加了label:enhancement
邢智雄邢智雄成员
7月24日 创建了 pull request,commit 383ae6ab
atomgit-bot
atomgit-bot
7月24日 评论:

变更摘要

此 PR 主要对 autofuse 模块的依赖文件进行了目录重组:将原本分散在 compiler/graph/optimize/autofuse/ 下的 ascirautofusegraphproto 等多个子模块的头文件和 proto 文件统一迁移至新建的 temporary_dependencies/ 目录下,并同步更新了 CMake 构建脚本中 proto 目录的引用路径。

主要改动

  • Proto 目录路径更新autofuse_protos.cmake 中将 AUTOFUSE_PROTO_DIR 的路径从 ${CODE_ROOT_DIR}/proto 修改为 ${CODE_ROOT_DIR}/temporary_dependencies/proto,以适配 proto 文件的新位置。
  • ascir 相关头文件迁移ascir_ops.haxis_utils.hcg_utils.hdtype_transform_utils.hnode_utils_ex.h 等文件从原位置移动至 temporary_dependencies/ascir/ 目录下。
  • autofuse 公共与融合头文件迁移autofuse_backend_spec_api.hautofuse_base_type.hautofuse_platform_api.hautofuse_attrs.hfuse_type.hfusion_decider.hloop_types.haxis_group.h 等移动至 temporary_dependencies/autofuse/ 对应子目录。
  • ascendc_ir 图相关头文件迁移ascend_reg_ops.hascendc_ir_check.hasc_graph_ge_bridge.hascendc_ir.hascendc_ir_def.hattr_store.h 以及 serialization/attribute_group/debug/utils/ 下的多个头文件均迁移至 temporary_dependencies/graph/ascendc_ir/ 目录。
  • Proto 文件迁移af_ir.protoascendc_ir.proto 移动至 temporary_dependencies/proto/ 目录。
likedislike
atomgit-bot
atomgit-bot
7月24日 评论:

代码审查

审查总结

我对全部 36 个变更文件逐一审查完毕,结果如下:

发现的问题

优先级 数量 说明
P2 2 ascir/meta 目录引用未随迁移更新

各文件审查结果

文件 结果
compiler/graph/optimize/autofuse/CMakeLists.txt 无问题
compiler/graph/optimize/autofuse/autofuse/CMakeLists.txt 无问题
compiler/graph/optimize/autofuse/cmake/autofuse_protos.cmake 无问题
temporary_dependencies/ascir/ascir_ops.h 无问题(仅迁移)
temporary_dependencies/ascir/utils/axis_utils.h 无问题(仅迁移)
temporary_dependencies/ascir/utils/cg_utils.h 无问题(仅迁移)
temporary_dependencies/ascir/utils/dtype_transform_utils.h 无问题(仅迁移)
temporary_dependencies/ascir/utils/node_utils_ex.h 无问题(仅迁移)
temporary_dependencies/autofuse/autoschedule/axis_group.h 无问题(仅迁移)
temporary_dependencies/autofuse/common/autofuse_backend_spec_api.h 无问题(仅迁移)
temporary_dependencies/autofuse/common/autofuse_base_type.h 无问题(仅迁移)
temporary_dependencies/autofuse/common/autofuse_platform_api.h 无问题(仅迁移)
temporary_dependencies/autofuse/fusion/autofuse_attrs.h 无问题(仅迁移)
temporary_dependencies/autofuse/fusion/fuse_type.h 无问题(仅迁移)
temporary_dependencies/autofuse/fusion/fusion_decider.h 无问题(仅迁移)
temporary_dependencies/autofuse/fusion/loop_types.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascend_reg_ops.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_check.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/asc_graph_ge_bridge.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/ascendc_ir.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/ascendc_ir_def.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/attr_store.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/attribute_group/af_attr_group_base.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/debug/ge_util.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/serialization/attr_serializer.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascendc_ir_core/serialization/attr_serializer_registry.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/ascir_registry.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/utils/asc_graph_utils.h 无问题(仅迁移)
temporary_dependencies/graph/ascendc_ir/utils/cg_calc_tmp_buff_common_funcs.h 无问题(仅迁移)
temporary_dependencies/proto/af_ir.proto 无问题(仅迁移)
temporary_dependencies/proto/ascendc_ir.proto 无问题(仅迁移)
tests/autofuse/CMakeLists.txt 无问题
tests/depends/aihacb_autofusion/CMakeLists.txt ⚠️ 1 个 P2 问题
tests/ge/st/testcase/CMakeLists.txt 无问题
tests/ge/st/testcase/autofuse/CMakeLists.txt 无问题
tests/ge/ut/ge/CMakeLists.txt ⚠️ 1 个 P2 问题

整体风险评估

低风险。这是一次结构性的头文件目录重组,将 graph/ascir/ascir/utils/ 等目录统一迁移到 temporary_dependencies/ 下。CMake 的 include 路径更新在绝大部分位置是完整一致的。唯一的隐患是 ascir/meta/ 子目录引用在两个测试 CMakeLists 中未被更新——若该目录原本包含实际头文件,将导致对应测试目标编译失败;若目录原本为空则无害。建议核实后处理。

类型 数量
🔴 阻塞 0
🟡 建议 2

💬 仅评论

likedislike
CANN-robotCANN-robot成员
7月24日 添加了label:cann-cla/yes
此处折叠了44条消息 查看更多
邢智雄
邢智雄成员
7月25日 评论:

/check-pr

likedislike
CANN-robot
CANN-robot成员
7月25日 评论:

The following label is not ready.

approved: Please wait for committers to review the code.

likedislike
zhanj
zhanj成员
7月25日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7月25日 添加了label:approved
CANN-robotCANN-robot成员
7月25日 合入了pull request