From 37b3eb07a9fecda24a10c9e9f1d6e505b62a2b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=A3=8A?= Date: Sat, 8 May 2021 17:34:31 +0800 Subject: [PATCH] dependencies graphengine_protos --- ge/CMakeLists.txt | 4 ++++ ge/common/CMakeLists.txt | 6 +++--- ge/executor/CMakeLists.txt | 4 ++-- ge/ge_local_engine/CMakeLists.txt | 10 +++++----- ge/host_cpu_engine/CMakeLists.txt | 16 ++++++++++++++-- ge/offline/CMakeLists.txt | 4 ++-- ge/plugin/engine/CMakeLists.txt | 4 ++++ 7 files changed, 34 insertions(+), 14 deletions(-) diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index febb6898..7cb4262a 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -811,6 +811,10 @@ add_library(ge_compiler SHARED ${INFER_SRC_LIST} ) +add_dependencies(ge_compiler + graphengine_protos +) + target_compile_definitions(ge_compiler PRIVATE PROTOBUF_INLINE_NOT_IN_HEADERS=0 REUSE_MEMORY=1 diff --git a/ge/common/CMakeLists.txt b/ge/common/CMakeLists.txt index dc71aa89..7974a46d 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -50,7 +50,7 @@ if (NOT ENABLE_D AND NOT ENABLE_ACL) add_library(ge_common SHARED ${SRC_LIST}) add_dependencies(ge_common - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_definitions(ge_common PRIVATE @@ -116,7 +116,7 @@ target_link_libraries(ge_common PRIVATE add_library(ge_common_static STATIC ${SRC_LIST}) add_dependencies(ge_common_static - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_definitions(ge_common_static PRIVATE @@ -173,7 +173,7 @@ else () add_library(ge_common SHARED ${SRC_LIST}) add_dependencies(ge_common - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_definitions(ge_common PRIVATE diff --git a/ge/executor/CMakeLists.txt b/ge/executor/CMakeLists.txt index 375439cf..8ae661a7 100644 --- a/ge/executor/CMakeLists.txt +++ b/ge/executor/CMakeLists.txt @@ -154,7 +154,7 @@ set(SRC_LIST add_library(ge_executor STATIC ${SRC_LIST}) add_dependencies(ge_executor - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(ge_executor PRIVATE @@ -206,7 +206,7 @@ target_link_libraries(ge_executor PRIVATE add_library(ge_executor_shared SHARED ${SRC_LIST}) add_dependencies(ge_executor_shared - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(ge_executor_shared PRIVATE diff --git a/ge/ge_local_engine/CMakeLists.txt b/ge/ge_local_engine/CMakeLists.txt index 36bf9811..3675d333 100755 --- a/ge/ge_local_engine/CMakeLists.txt +++ b/ge/ge_local_engine/CMakeLists.txt @@ -19,7 +19,7 @@ set(OPS_KERNEL_SRC_LIST add_library(ge_local_engine SHARED ${SRC_LIST}) add_dependencies(ge_local_engine - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(ge_local_engine PRIVATE @@ -69,7 +69,7 @@ target_link_libraries(ge_local_engine PRIVATE add_library(atc_ge_local_engine SHARED ${SRC_LIST}) add_dependencies(atc_ge_local_engine - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(atc_ge_local_engine PRIVATE @@ -124,7 +124,7 @@ set_target_properties(atc_ge_local_engine PROPERTIES add_library(ge_local_opskernel_builder SHARED ${OPS_KERNEL_SRC_LIST}) add_dependencies(ge_local_opskernel_builder - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(ge_local_opskernel_builder PRIVATE @@ -175,7 +175,7 @@ target_link_libraries(ge_local_opskernel_builder PRIVATE add_library(atc_ge_local_opskernel_builder SHARED ${OPS_KERNEL_SRC_LIST}) add_dependencies(atc_ge_local_opskernel_builder - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(atc_ge_local_opskernel_builder PRIVATE @@ -231,7 +231,7 @@ set_target_properties(atc_ge_local_opskernel_builder PROPERTIES add_library(ge_local_opskernel_builder_static STATIC ${OPS_KERNEL_SRC_LIST}) add_dependencies(ge_local_opskernel_builder_static - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(ge_local_opskernel_builder_static PRIVATE diff --git a/ge/host_cpu_engine/CMakeLists.txt b/ge/host_cpu_engine/CMakeLists.txt index 29e8dff6..d54dacf7 100644 --- a/ge/host_cpu_engine/CMakeLists.txt +++ b/ge/host_cpu_engine/CMakeLists.txt @@ -13,7 +13,7 @@ set(CPU_OPS_KERNEL_LIST add_library(host_cpu_engine SHARED ${SRC_LIST}) add_dependencies(host_cpu_engine - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(host_cpu_engine PRIVATE @@ -62,7 +62,7 @@ target_link_libraries(host_cpu_engine PRIVATE add_library(atc_host_cpu_engine SHARED ${SRC_LIST}) add_dependencies(atc_host_cpu_engine - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(atc_host_cpu_engine PRIVATE @@ -115,6 +115,10 @@ set_target_properties(atc_host_cpu_engine PROPERTIES ############ libhost_cpu_opskernel_builder.so ############ add_library(host_cpu_opskernel_builder SHARED ${CPU_OPS_KERNEL_LIST}) +add_dependencies(host_cpu_opskernel_builder + graphengine_protos +) + target_compile_options(host_cpu_opskernel_builder PRIVATE -Werror -fno-common @@ -161,6 +165,10 @@ target_link_libraries(host_cpu_opskernel_builder PRIVATE ############ atclib/libhost_cpu_opskernel_builder.so ############ add_library(atc_host_cpu_opskernel_builder SHARED ${CPU_OPS_KERNEL_LIST}) +add_dependencies(atc_host_cpu_opskernel_builder + graphengine_protos +) + target_compile_options(atc_host_cpu_opskernel_builder PRIVATE -Werror -fno-common @@ -212,6 +220,10 @@ set_target_properties(atc_host_cpu_opskernel_builder PROPERTIES ############ libhost_cpu_opskernel_builder.a ############ add_library(host_cpu_opskernel_builder_static STATIC ${CPU_OPS_KERNEL_LIST}) +add_dependencies(host_cpu_opskernel_builder_static + graphengine_protos +) + target_compile_options(host_cpu_opskernel_builder_static PRIVATE -Werror -fno-common diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index aa50419c..a520652f 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -9,7 +9,7 @@ set(SRC_LIST add_executable(atc_atc.bin ${SRC_LIST}) add_dependencies(atc_atc.bin - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(atc_atc.bin PRIVATE @@ -86,7 +86,7 @@ set_target_properties(atc_atc.bin PROPERTIES add_executable(fwk_atc.bin ${SRC_LIST}) add_dependencies(fwk_atc.bin - ge_fusion_model_protos_obj + graphengine_protos ) target_compile_options(fwk_atc.bin PRIVATE diff --git a/ge/plugin/engine/CMakeLists.txt b/ge/plugin/engine/CMakeLists.txt index 9e7eda20..b4ea9c52 100644 --- a/ge/plugin/engine/CMakeLists.txt +++ b/ge/plugin/engine/CMakeLists.txt @@ -6,6 +6,10 @@ set(SRC_LIST ############ libengine.so ############ add_library(engine SHARED ${SRC_LIST}) +add_dependencies(engine + graphengine_protos +) + target_compile_options(engine PRIVATE -Werror -fno-common