跨仓头文件重复扫描按**文件名(basename)**判定,与文件所在路径无关。
commit 96149df 已将 op_resource.h 从 common/inc/op_api 迁移到 common/include/static/ras(路径隔离),但文件名未变,仍与 ops-transformer(common/include/static/op_resource.h)、ops-cv(common/inc/op_api/op_resource.h)等仓同名,跨仓扫描仍判定为重复头文件。
op_resource.h
common/inc/op_api
common/include/static/ras
common/include/static/op_resource.h
common/inc/op_api/op_resource.h
跨仓头文件扫描治理结果。
_ras
op_resource_ras.h
COMMON_RAS_OP_RESOURCE_H
COMMON_RAS_OP_RESOURCE_RAS_H
\file
scripts/util/modify_gen_aclnn_static.py
cmake/variables.cmake
${OPS_RAS_DIR}/common/include/static/ras
OPAPI_INCLUDE
关联 PR: https://gitcode.com/cann/ops-ras/pull/110 https://gitcode.com/cann/ops-ras/pull/111
已合入修改
Backgroud(背景信息)
跨仓头文件重复扫描按**文件名(basename)**判定,与文件所在路径无关。
commit 96149df 已将
op_resource.h从common/inc/op_api迁移到common/include/static/ras(路径隔离),但文件名未变,仍与 ops-transformer(common/include/static/op_resource.h)、ops-cv(common/inc/op_api/op_resource.h)等仓同名,跨仓扫描仍判定为重复头文件。Origin(信息来源)
跨仓头文件扫描治理结果。
Benefit / Necessity (价值/作用)
_ras,避免与其他算子仓同名头文件冲突Design(设计方案)
op_resource.h恢复至 96149df 之前的路径common/inc/op_api,并原地重命名为op_resource_ras.hCOMMON_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.hcmake/variables.cmake:移除 96149df 新增的失效 include 路径${OPS_RAS_DIR}/common/include/static/ras(common/inc/op_api原本就在OPAPI_INCLUDE中)关联 PR:
https://gitcode.com/cann/ops-ras/pull/110
https://gitcode.com/cann/ops-ras/pull/111