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

描述

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

本 PR 将 PR #110 的修改同步到 9.2.0 分支,把头文件恢复至 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成员
12 天前 创建了 pull request,commit 17b5ba4c
LLiuZonggu成员
12 天前 关联了issue:[Requirement|需求建议]: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件扫描告警
CANN-robotCANN-robot成员
12 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
12 天前 评论:

CLA Signature Pass

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

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

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)
likedislike
LiuZonggu成员
12 天前 评论:

compile

likedislike
LLiuZonggu成员
12 天前 修改了pull request 的描述
LLiuZonggu成员
12 天前 修改标题为 “refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件(9.2.0)”,原标题为“refactor: 重命名 op_resource.h 为 op_resource_ras.h,消除跨仓重复头文件扫描(9.2.0)”
LLiuZonggu成员
12 天前 修改了pull request 的描述
CANN-robotCANN-robot成员
12 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
12 天前 评论:

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

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

[2026-09-20 15:12:38]    CI执行结束

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

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS

[2026-09-20 15:31:45]    CI执行结束

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

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

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

[2026-09-20 15:17:21]    CI执行结束

likedislike
CANN-robotCANN-robot成员
12 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
12 天前 添加了label:ci-pipeline-passed
於欣洁成员
12 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:approved
yue-ma成员
12 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:lgtm
CANN-robotCANN-robot成员
12 天前 关闭了关联的issue
CANN-robotCANN-robot成员
12 天前 合入了pull request