Pull Request已成功合入, 合并人@CANN-robot
(感谢 wuzheng 的贡献)变更摘要
本 PR 修复 runtime/om2/ 下与 base/ 目录重名文件导致的编译冲突问题。此前提交引入的变量格式转换/类型转换功能将 base/common/ 和 base/formats/ 下的文件拷贝至 runtime/om2/,造成 24 对同名 .h/.cc 文件且 header guard 完全相同的重复。本次为这些文件添加 om2_ 前缀进行重命名,并同步更新所有 #include 引用路径与 header guard 宏名(添加 OM2_ 前缀),已验证 ge_executor 和 ge_compiler 构建通过。
主要改动
- 文件重命名消除同名冲突:将
runtime/om2/common/(如datatype_transfer.h→om2_datatype_transfer.h、fp16_t.h→om2_fp16_t.h、hif8_t.h→om2_hif8_t.h)及runtime/om2/formats/(如formats.h→om2_formats.h、register_format_transfer.h→om2_register_format_transfer.h、format_transfer_*.h→om2_format_transfer_*.h)下共 24 对头文件/源文件重命名,使仓库中不再存在与base/同名文件。 - 更新
#include引用路径:所有源文件(如om2_datatype_transfer.cc、各om2_format_transfer_*.cc、om2_formats.cc、om2_register_format_transfer.cc)及引用方runtime/om2/om2_rt_var_manager.cc中的#include均改为指向新文件名,例如"formats/formats.h"→"formats/om2_formats.h"、"formats/utils/formats_trans_utils.h"→"formats/utils/om2_formats_trans_utils.h"。 - 更新 header guard 宏名:所有重命名头文件的 header guard 由
GE_COMMON_*/INC_REGISTER_*统一改为GE_OM2_COMMON_*/INC_OM2_*(如GE_COMMON_FORMATS_FORMATS_H_→GE_OM2_COMMON_FORMATS_FORMATS_H_、INC_REGISTER_REGISTER_FORMAT_TRANSFER_H_→INC_OM2_REGISTER_REGISTER_FORMAT_TRANSFER_H_),消除与base/版本宏的冲突。 - 交叉引用同步重定向:重命名后的头文件内部相互引用的 include 也同步更新,如
om2_datatype_transfer.h、om2_formats_trans_utils.h改引formats/om2_register_format_transfer.h,om2_hif8_t.h改引common/fp16_t/om2_fp16_t.h,om2_format_transfer_fz_c04.cc改引formats/om2_formats.h等,保证重命名后依赖链完整一致。


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.
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 |
|---|---|---|
| repo-cann/ge | ✅ 张德鹏, kobemini, stevenaw0 (3/2) | ✅ 张德鹏 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


流水线任务触发成功
任务链接 [3ee3d155d5a74a3aae766b2787688c76][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_ARM_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-08-20 10:54:11] CI执行结束


流水线任务触发成功
任务链接 [f6a63be8c94941a8af07ac7a51e7c4d5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_X86_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_dflow | ✅ SUCCESS | ||
| UT_Test_ge_common | ✅ SUCCESS | ||
| UT_Test_parser | ✅ SUCCESS | ||
| UT_Test_python | ✅ SUCCESS | >>>>> | |
| UT_Test_rt | ✅ SUCCESS | ||
| UT_Test_acl | ✅ SUCCESS | ||
| UT_Test_autofuse | ✅ SUCCESS | ||
| UT_Test_executor | ✅ SUCCESS | ||
| UT_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_dflow | ✅ SUCCESS | ||
| ST_Test_ge_common | ✅ SUCCESS | ||
| ST_Test_parser | ✅ SUCCESS | ||
| ST_Test_python | ✅ SUCCESS | >>>>> | |
| ST_Test_rt | ✅ SUCCESS | ||
| ST_Test_autofuse | ✅ SUCCESS | ||
| ST_Test_executor | ✅ SUCCESS | ||
| ST_Test_hetero | ✅ SUCCESS | ||
| ST_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_autofuse_e2e | ✅ SUCCESS | ||
| UT_Test_fe | ✅ SUCCESS | ||
| UT_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_fe | ✅ SUCCESS | ||
| ST_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_ge_common_atc | ✅ SUCCESS | ||
| UT_Test_Report_graphengine | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_graphengine | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_fe | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_fe | ✅ SUCCESS | >>>>> |
[2026-08-20 11:01:04] CI执行结束


流水线任务触发成功
任务链接 [3b7f03a5868c49449ded13260db2c158][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck_Pr | ✅ SUCCESS | ||
| antipoison | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| codecheck_dt | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-20 10:51:29] CI执行结束


/lgtm


/lgtm


Pull Request
描述
提交 f35963b72 引入了变量格式转换和类型转换功能,在
runtime/om2/common/和runtime/om2/formats/目录下新增了头文件和源文件。这些文件是从base/common/和base/formats/拷贝的,导致仓库中出现相同名称的头文件(24对重复文件),header guard 也完全相同。本次修改:
runtime/om2/下 24 对重复的.h/.cc文件重命名,添加om2_前缀#include引用路径指向新文件名OM2_前缀消除与base/版本的冲突ge_executor和ge_compiler构建通过变更类型
关联的Issue
如何测试
核对清单
其他信息
涉及 48 个文件变更(24 对 .h/.cc 文件重命名 + include 路径和 header guard 更新)。