已关闭
[Requirement|需求建议]: ops-ras 重复头文件路径隔离 #25
LiuZonggu创建于  8月29日关闭于  8月31日
LiuZonggu成员
8月29日 创建

Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.

Backgroud(背景信息)

跨仓头文件扫描发现 ops-ras 与其他仓库存在 5 个重复头文件路径:

  • common/inc/op_api/aclnn_util.h
  • common/inc/op_api/level2_base.h
  • common/inc/framework/onnx_common.h
  • common/inc/op_api/op_api_def.h
  • common/inc/op_api/op_resource.h

仓库要求消除这些重复头文件路径,同时 aclnn_util.h 和 op_resource.h 仍有实际构建用途,不能直接删除,也不应为了避重修改通用文件名或宏名称。

Origin(信息来源)

来源于 ops-ras 跨仓头文件重复扫描和工程精简要求。

Benefit / Necessity (价值/作用)

  • 消除扫描清单中的跨仓重复头文件路径,明确各仓头文件归属。
  • 避免同名公共工程头文件在多个仓以相同相对路径维护。
  • 保持现有 ACLNN 声明、静态资源生成宏、构建流程和安装包 ABI 不变。
  • 避免将 op_resource.h 改成仓库特定名称而引入生成脚本和消费者改造。

Design(设计方案)

  • 对无须继续由 ops-ras 保留的 onnx_common.h、level2_base.h、op_api_def.h 直接清理,并同步分类规则。
  • 将 aclnn_util.h 放入 common/include/external 类别,将 op_resource.h 放入 common/include/static 类别。
  • 在分类目录下增加 ras 命名空间,最终路径为:
    • common/include/external/ras/aclnn_util.h
    • common/include/static/ras/op_resource.h
  • 两个文件均保持文件名和内容不变,Git 识别为 R100;现有消费者仍使用裸文件名 include。
  • 在 OPAPI_INCLUDE 中增加两个新目录,不修改 ACLNN 对外头文件和资源生成脚本。
  • 安装卸载和 UT 验证。

关联 PR:https://gitcode.com/cann/ops-ras/merge_requests/89

likedislike
LLiuZonggu成员
8月29日 添加了label:requirement
LLiuZonggu成员
8月29日 将 LiuZonggu 设为负责人
LLiuZonggu成员
8月31日 修改了issue 的描述
LLiuZonggu成员
8月31日 修改了issue 的描述
LLiuZonggu成员
8月31日 修改了issue 的描述
CANN-robotCANN-robot成员
8月31日 关闭了 issue
LLiuZonggu成员
8月31日 issue状态由 进行中 改变为 已完成
CANN-robotCANN-robot成员
8月31日 添加了label:resolved