已合并
refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件 #110
refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件 #110
已合并
LiuZonggu创建于 6 天前
LiuZonggu成员
6 天前

描述

跨仓头文件重复扫描按**文件名(basename)**判定,与文件所在路径无关。commit 96149df 已将 op_resource.h 从 common/inc/op_api 迁移到 common/include/static/ras(路径隔离),但文件名未变,跨仓扫描仍判定为重复头文件。

本 PR 将头文件恢复至 96149df 之前的路径并原地重命名:

  • common/include/static/ras/op_resource.h → common/inc/op_api/op_resource_ras.h,include guard 由 COMMON_RAS_OP_RESOURCE_H 更新为 COMMON_RAS_OP_RESOURCE_RAS_H,\file 注释同步更新
  • scripts/util/modify_gen_aclnn_static.py:autogen 阶段 sed 替换目标由 op_resource.h 改为 op_resource_ras.h
  • cmake/variables.cmake:移除 96149df 新增的失效 include 路径 ${OPS_RAS_DIR}/common/include/static/ras(common/inc/op_api 原本就在 OPAPI_INCLUDE 中,构建接线无需新增)

关联的Issue

关联 Issue https://gitcode.com/cann/ops-ras/issues/39

测试

全仓检查无 op_resource.h 残留引用,宏 EXTERN_OP_RESOURCE / AUTO_GEN_OP_RESOURCE 及其余逻辑未改动

文档更新

无

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 LiuZonggu 的贡献)
LLiuZonggu成员
6 天前 创建了 pull request,commit 54af3c45
CANN-robotCANN-robot成员
6 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6 天前 评论:

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
repo-cann/ops-ras ✅ yue-ma, 於欣洁 (2/2) ✅ yue-ma, 於欣洁 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
LiuZonggu成员
6 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-09-20 11:34:50]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
API_Check ⚠️ WARNING >>>>>

[2026-09-20 11:36:48]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:api-check-failed
CANN-robotCANN-robot成员
6 天前 删除了label:api-check-failed
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ❌ FAILED >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-failed
LiuZonggu成员
6 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-09-20 12:00:53]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
API_Check ⚠️ WARNING >>>>>

[2026-09-20 12:02:50]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:api-check-failed
CANN-robotCANN-robot成员
6 天前 删除了label:api-check-failed
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ❌ FAILED >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>
likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-failed
LiuZonggu成员
6 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
6 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
API_Check ⚠️ WARNING >>>>>

[2026-09-20 14:11:57]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-09-20 14:10:36]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:api-check-failed
CANN-robotCANN-robot成员
6 天前 删除了label:api-check-failed
CANN-robot
CANN-robot成员
6 天前 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
codecheck_codestyle ⚠️ WARNING >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-09-20 14:13:19]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6 天前 删除了label:ci-pipeline-running
此处折叠了5条事件消息 查看更多
LLiuZonggu成员
6 天前 修改标题为 “refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件”,原标题为“refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件扫描”
yue-ma成员
6 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:approved
於欣洁成员
6 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:lgtm
CANN-robotCANN-robot成员
6 天前 合入了pull request