diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index e94258ac..5181bb61 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -718,7 +718,6 @@ target_compile_definitions(ge_compiler PRIVATE FMK_HOST_INFER COMPILE_OMG_PACKAGE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(ge_compiler PRIVATE @@ -806,7 +805,6 @@ endif() target_compile_definitions(opensrc_ascendcl PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(opensrc_ascendcl PRIVATE diff --git a/ge/common/CMakeLists.txt b/ge/common/CMakeLists.txt index d2b8c8e7..bb08570a 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -73,7 +73,6 @@ target_compile_definitions(ge_common PRIVATE FMK_SUPPORT_DUMP OS_CENTOS google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(ge_common PRIVATE @@ -133,7 +132,6 @@ target_compile_definitions(ge_common_static PRIVATE $,OS_TYPE=WIN,OS_TYPE=0> $<$:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX> LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(ge_common_static PRIVATE @@ -182,7 +180,6 @@ target_compile_definitions(ge_common PRIVATE FMK_SUPPORT_DUMP OS_CENTOS google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(ge_common PRIVATE diff --git a/ge/executor/CMakeLists.txt b/ge/executor/CMakeLists.txt index ac4d4ebd..755bdf97 100644 --- a/ge/executor/CMakeLists.txt +++ b/ge/executor/CMakeLists.txt @@ -175,7 +175,6 @@ target_compile_definitions(ge_executor PRIVATE $,OS_TYPE=WIN,OS_TYPE=0> $<$:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX> LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_executor PRIVATE @@ -218,7 +217,6 @@ target_compile_definitions(ge_executor_shared PRIVATE PROTOBUF_INLINE_NOT_IN_HEADERS=0 DAVINCI_SUPPORT_PROFILING google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_executor_shared PRIVATE diff --git a/ge/ge_local_engine/CMakeLists.txt b/ge/ge_local_engine/CMakeLists.txt index f963730b..7189e8ff 100755 --- a/ge/ge_local_engine/CMakeLists.txt +++ b/ge/ge_local_engine/CMakeLists.txt @@ -31,7 +31,6 @@ target_compile_options(ge_local_engine PRIVATE target_compile_definitions(ge_local_engine PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_local_engine PRIVATE @@ -73,7 +72,6 @@ target_compile_options(atc_ge_local_engine PRIVATE target_compile_definitions(atc_ge_local_engine PRIVATE COMPILE_OMG_PACKAGE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc_ge_local_engine PRIVATE @@ -119,7 +117,6 @@ target_compile_options(ge_local_opskernel_builder PRIVATE target_compile_definitions(ge_local_opskernel_builder PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_local_opskernel_builder PRIVATE @@ -161,7 +158,6 @@ target_compile_options(atc_ge_local_opskernel_builder PRIVATE target_compile_definitions(atc_ge_local_opskernel_builder PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc_ge_local_opskernel_builder PRIVATE @@ -209,7 +205,6 @@ target_compile_options(ge_local_opskernel_builder_static PRIVATE target_compile_definitions(ge_local_opskernel_builder_static PRIVATE google=ascend_private LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_local_opskernel_builder_static PRIVATE diff --git a/ge/ge_runtime/CMakeLists.txt b/ge/ge_runtime/CMakeLists.txt index ca770b15..ce1b89ea 100644 --- a/ge/ge_runtime/CMakeLists.txt +++ b/ge/ge_runtime/CMakeLists.txt @@ -27,7 +27,6 @@ target_compile_options(ge_runtime PRIVATE target_compile_definitions(ge_runtime PRIVATE PROTOBUF_INLINE_NOT_IN_HEADERS=0 - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(ge_runtime PRIVATE diff --git a/ge/graph/build/memory/CMakeLists.txt b/ge/graph/build/memory/CMakeLists.txt new file mode 100644 index 00000000..126e0187 --- /dev/null +++ b/ge/graph/build/memory/CMakeLists.txt @@ -0,0 +1,44 @@ +set(SRC_LIST + "memory_assigner.cc" + "graph_mem_assigner.cc" + "binary_block_mem_assigner.cc" + "block_mem_assigner.cc" + "hybrid_mem_assigner.cc" + "max_block_mem_assigner.cc" + "var_mem_assign_util.cc" +) + +############ libge_memory.a ############ +add_library(ge_memory STATIC ${SRC_LIST}) + +target_compile_options(ge_memory PRIVATE + -Werror + -O2 + -fno-common +) + +target_compile_definitions(ge_memory PRIVATE + google=ascend_private + LOG_CPP +) + +target_link_libraries(ge_memory PRIVATE + $ + ascend_protobuf + c_sec +) + +target_include_directories(ge_memory PRIVATE + ${CMAKE_CURRENT_LIST_DIR} + ${GE_CODE_DIR}/ge + ${GE_CODE_DIR}/inc + ${GE_CODE_DIR}/inc/external + ${METADEF_DIR}/inc + ${METADEF_DIR}/inc/external + ${METADEF_DIR}/inc/external/graph + ${GE_CODE_DIR}/inc/framework + #### yellow zone #### + ${GE_CODE_DIR}/../inc + #### blue zone #### + ${GE_CODE_DIR}/third_party/fwkacllib/inc +) diff --git a/ge/host_cpu_engine/CMakeLists.txt b/ge/host_cpu_engine/CMakeLists.txt index f20f810e..cbd0bd8b 100644 --- a/ge/host_cpu_engine/CMakeLists.txt +++ b/ge/host_cpu_engine/CMakeLists.txt @@ -25,7 +25,6 @@ target_compile_options(host_cpu_engine PRIVATE target_compile_definitions(host_cpu_engine PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(host_cpu_engine PRIVATE @@ -66,7 +65,6 @@ target_compile_options(atc_host_cpu_engine PRIVATE target_compile_definitions(atc_host_cpu_engine PRIVATE COMPILE_OMG_PACKAGE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc_host_cpu_engine PRIVATE @@ -111,7 +109,6 @@ target_compile_options(host_cpu_opskernel_builder PRIVATE target_compile_definitions(host_cpu_opskernel_builder PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(host_cpu_opskernel_builder PRIVATE @@ -152,7 +149,6 @@ target_compile_options(atc_host_cpu_opskernel_builder PRIVATE target_compile_definitions(atc_host_cpu_opskernel_builder PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc_host_cpu_opskernel_builder PRIVATE @@ -199,7 +195,6 @@ target_compile_options(host_cpu_opskernel_builder_static PRIVATE target_compile_definitions(host_cpu_opskernel_builder_static PRIVATE google=ascend_private LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(host_cpu_opskernel_builder_static PRIVATE diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index cb6a3a50..d195e06f 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -30,7 +30,6 @@ target_compile_definitions(atc PRIVATE COMPILE_OMG_PACKAGE google=ascend_private LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc PRIVATE @@ -93,7 +92,6 @@ target_compile_definitions(atc_atc.bin PRIVATE COMPILE_OMG_PACKAGE google=ascend_private LOG_CPP - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc_atc.bin PRIVATE @@ -154,7 +152,6 @@ target_compile_options(fwk_atc.bin PRIVATE -O2 -Wno-deprecated-declarations -fno-common - $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_definitions(fwk_atc.bin PRIVATE diff --git a/ge/plugin/engine/CMakeLists.txt b/ge/plugin/engine/CMakeLists.txt index 65d5a8a1..f6353231 100644 --- a/ge/plugin/engine/CMakeLists.txt +++ b/ge/plugin/engine/CMakeLists.txt @@ -14,7 +14,6 @@ target_compile_options(engine PRIVATE target_compile_definitions(engine PRIVATE REUSE_MEMORY=1 PROTOBUF_INLINE_NOT_IN_HEADERS=0 - $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(engine PRIVATE