已合并
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创建于 18 天前
共 3 个文件变更+5-6
@@ -155,7 +155,6 @@ set(OPAPI_INCLUDE
155 ${AICPU_INC_DIRS}155 ${AICPU_INC_DIRS}
156 ${OPS_RAS_DIR}/common/include156 ${OPS_RAS_DIR}/common/include
157 ${OPS_RAS_DIR}/common/include/external/ras157 ${OPS_RAS_DIR}/common/include/external/ras
158- ${OPS_RAS_DIR}/common/include/static/ras
159 ${OPS_RAS_DIR}/common/inc158 ${OPS_RAS_DIR}/common/inc
160 ${OPS_RAS_DIR}/common/inc/op_api159 ${OPS_RAS_DIR}/common/inc/op_api
161 ${TOP_DIR}/output/${PRODUCT}/aclnnop_resource160 ${TOP_DIR}/output/${PRODUCT}/aclnnop_resource
Rcommon/include/static/ras/op_resource.h→common/inc/op_api/op_resource_ras.h+4-4
@@ -9,11 +9,11 @@
9 */9 */
10 10 
11/*!11/*!
12- * \file op_resource.h12+ * \file op_resource_ras.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef COMMON_RAS_OP_RESOURCE_H15+#ifndef COMMON_RAS_OP_RESOURCE_RAS_H
16-#define COMMON_RAS_OP_RESOURCE_H16+#define COMMON_RAS_OP_RESOURCE_RAS_H
17 17 
18#define EXTERN_OP_RESOURCE(kernelName) \18#define EXTERN_OP_RESOURCE(kernelName) \
19namespace l0op { \19namespace l0op { \
@@ -29,4 +29,4 @@ namespace l0op { \
29 {{l0op::kernelName##TilingRegisterResource(), l0op::kernelName##InferShapeRegisterResource(), l0op::kernelName##TuningRegisterResource()}, \29 {{l0op::kernelName##TilingRegisterResource(), l0op::kernelName##InferShapeRegisterResource(), l0op::kernelName##TuningRegisterResource()}, \
30 l0op::kernelName##KernelResource(), l0op::kernelName##TuningResource()}}} \30 l0op::kernelName##KernelResource(), l0op::kernelName##TuningResource()}}} \
31 31 
32-#endif // COMMON_RAS_OP_RESOURCE_H32+#endif // COMMON_RAS_OP_RESOURCE_RAS_H
@@ -43,7 +43,7 @@ def modify_gen_aclnn(build_path):
43 for aclnn_cpp in auto_gen_cpps:43 for aclnn_cpp in auto_gen_cpps:
44 (op_type, index) = search_file(aclnn_cpp)44 (op_type, index) = search_file(aclnn_cpp)
45 if op_type:45 if op_type:
46- shell_exec(["bash", "-c", f"""sed -i 's/{op_type}_op_resource.h/op_resource.h/g' {aclnn_cpp}"""],46+ shell_exec(["bash", "-c", f"""sed -i 's/{op_type}_op_resource.h/op_resource_ras.h/g' {aclnn_cpp}"""],
47 shell=False)47 shell=False)
48 shell_exec(48 shell_exec(
49 ["bash", "-c", f"""sed -i 's/{op_type}_RESOURCES/AUTO_GEN_OP_RESOURCE({op_type})/g' {aclnn_cpp}"""],49 ["bash", "-c", f"""sed -i 's/{op_type}_RESOURCES/AUTO_GEN_OP_RESOURCE({op_type})/g' {aclnn_cpp}"""],