已合并
【PR】: [fix] [autofuse] move copied headers to the same dir. #4127
邢智雄创建于 7月24日
【PR】: [fix] [autofuse] move copied headers to the same dir. #4127
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 邢智雄 的贡献)7月24日 添加了label:enhancement
atomgit-bot
7月24日 评论:
7月24日 评论:
变更摘要
此 PR 主要对 autofuse 模块的依赖文件进行了目录重组:将原本分散在 compiler/graph/optimize/autofuse/ 下的 ascir、autofuse、graph、proto 等多个子模块的头文件和 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.h、axis_utils.h、cg_utils.h、dtype_transform_utils.h、node_utils_ex.h等文件从原位置移动至temporary_dependencies/ascir/目录下。autofuse公共与融合头文件迁移:autofuse_backend_spec_api.h、autofuse_base_type.h、autofuse_platform_api.h、autofuse_attrs.h、fuse_type.h、fusion_decider.h、loop_types.h、axis_group.h等移动至temporary_dependencies/autofuse/对应子目录。ascendc_ir图相关头文件迁移:ascend_reg_ops.h、ascendc_ir_check.h、asc_graph_ge_bridge.h、ascendc_ir.h、ascendc_ir_def.h、attr_store.h以及serialization/、attribute_group/、debug/、utils/下的多个头文件均迁移至temporary_dependencies/graph/ascendc_ir/目录。- Proto 文件迁移:
af_ir.proto和ascendc_ir.proto移动至temporary_dependencies/proto/目录。


atomgit-bot
7月24日 评论:
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 |
💬 仅评论


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


CANN-robot
7月25日 评论:
7月25日 评论:
The following label is not ready.
approved: Please wait for committers to review the code.


zhanj
7月25日 评论:
7月25日 评论:
/approve


7月25日 添加了label:approved
7月25日 合入了pull request
Pull Request
描述
将autofuse目录下从graph-autofusion仓拷贝过来的头文件都汇总到一个目录下,后续等ascir标准化需求落地后可以一把删除。
变更类型
请选择本次引入的变更类型:
关联的Issue
如何测试
描述测试此变更的步骤和前提条件:
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。