From 592811c67960d2626b7f6a8627b718ea777a0cdd Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 10:21:18 +0800 Subject: [PATCH 01/12] add macro --- ge/common/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ge/common/CMakeLists.txt b/ge/common/CMakeLists.txt index bb08570a..1598ffd5 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -73,6 +73,7 @@ target_compile_definitions(ge_common PRIVATE FMK_SUPPORT_DUMP OS_CENTOS google=ascend_private + $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_options(ge_common PRIVATE From e5430e1223645f18d5d60a5d87499354bd9d9631 Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 10:23:09 +0800 Subject: [PATCH 02/12] add macro --- metadef | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadef b/metadef index 3044f2da..9d7033e5 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 3044f2da694cd61f5d9946709134cbcc849190e4 +Subproject commit 9d7033e53192d97a4e63269cd05e0dcaf3dee130 From 062e87de2942d410b81549cf53d11eb1034e46fc Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 10:24:48 +0800 Subject: [PATCH 03/12] add macro --- parser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser b/parser index ecde83dc..dd333c0c 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit ecde83dc9da0d58522b4a90c4d90c242c75011fd +Subproject commit dd333c0cd360c57d982f3a5b8ed0fa14c45d8e57 From f5390707a4747058a5c9c70980adae19c08c166b Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 11:36:17 +0800 Subject: [PATCH 04/12] add macro --- metadef | 2 +- parser | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadef b/metadef index 9d7033e5..11c6cf29 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 9d7033e53192d97a4e63269cd05e0dcaf3dee130 +Subproject commit 11c6cf2921b6a385616a3ebc601b4431b55b07db diff --git a/parser b/parser index dd333c0c..99437c39 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit dd333c0cd360c57d982f3a5b8ed0fa14c45d8e57 +Subproject commit 99437c39d26624a14060307366a96b79b1d439c3 From d986f9aa5e44824edae3734105ca4ef62af1761c Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 11:55:07 +0800 Subject: [PATCH 05/12] add macro --- tests/ut/common/graph/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ut/common/graph/CMakeLists.txt b/tests/ut/common/graph/CMakeLists.txt index 99b21182..e2490150 100644 --- a/tests/ut/common/graph/CMakeLists.txt +++ b/tests/ut/common/graph/CMakeLists.txt @@ -110,6 +110,7 @@ target_compile_options(ut_libgraph PRIVATE target_compile_definitions(ut_libgraph PRIVATE google=ascend_private + $<$:ONLY_COMPILE_OPEN_SRC> ) target_link_libraries(ut_libgraph From f5bca22f53a71a627cfc5e6885d316dc3efe03b4 Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 12:58:59 +0800 Subject: [PATCH 06/12] add macro --- tests/ut/ge/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index 175774bb..21720534 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -922,6 +922,7 @@ target_compile_options(ut_libge_distinct_load_utest PRIVATE target_compile_definitions(ut_libge_distinct_load_utest PRIVATE google=ascend_private + $<$:ONLY_COMPILE_OPEN_SRC> ) target_link_libraries(ut_libge_distinct_load_utest From 3f610d914bd49aabd2f0d01ade47d630ccd71d81 Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 13:12:52 +0800 Subject: [PATCH 07/12] add macro --- tests/ut/ge/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index 21720534..64247930 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -902,6 +902,10 @@ target_compile_options(ut_libge_kernel_utest PRIVATE -g --coverage -fprofile-arcs -ftest-coverage ) +target_compile_definitions(ut_libge_distinct_load_utest PRIVATE + $<$:ONLY_COMPILE_OPEN_SRC> +) + target_link_libraries(ut_libge_kernel_utest $ ge_load_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov @@ -922,7 +926,6 @@ target_compile_options(ut_libge_distinct_load_utest PRIVATE target_compile_definitions(ut_libge_distinct_load_utest PRIVATE google=ascend_private - $<$:ONLY_COMPILE_OPEN_SRC> ) target_link_libraries(ut_libge_distinct_load_utest From f9b4ae65fc15f2979e9acb5a6f13586d04987f7a Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 13:13:29 +0800 Subject: [PATCH 08/12] add macro --- tests/ut/ge/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index 64247930..da3b1e42 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -902,7 +902,7 @@ target_compile_options(ut_libge_kernel_utest PRIVATE -g --coverage -fprofile-arcs -ftest-coverage ) -target_compile_definitions(ut_libge_distinct_load_utest PRIVATE +target_compile_definitions(ut_libge_kernel_utest PRIVATE $<$:ONLY_COMPILE_OPEN_SRC> ) From c47a89e2360345d75b871250dba00501cc78863d Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 13:22:59 +0800 Subject: [PATCH 09/12] add macro --- tests/ut/ge/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index da3b1e42..48f6eb39 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -926,6 +926,7 @@ target_compile_options(ut_libge_distinct_load_utest PRIVATE target_compile_definitions(ut_libge_distinct_load_utest PRIVATE google=ascend_private + $<$:ONLY_COMPILE_OPEN_SRC> ) target_link_libraries(ut_libge_distinct_load_utest From ef922e7c003c8211450aa214e1235176e8922e8d Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 13:39:08 +0800 Subject: [PATCH 10/12] add macro --- tests/ut/ge/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ut/ge/CMakeLists.txt b/tests/ut/ge/CMakeLists.txt index 48f6eb39..b14465a8 100755 --- a/tests/ut/ge/CMakeLists.txt +++ b/tests/ut/ge/CMakeLists.txt @@ -885,6 +885,10 @@ target_compile_options(ut_libge_others_utest PRIVATE -g --coverage -fprofile-arcs -ftest-coverage ) +target_compile_definitions(ut_libge_others_utest PRIVATE + $<$:ONLY_COMPILE_OPEN_SRC> +) + target_link_libraries(ut_libge_others_utest $ ge_load_common ge_execute_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov From c81c2e80daf633bf2bab8fd43300e0dbfa9460a9 Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 14:11:29 +0800 Subject: [PATCH 11/12] add macro --- ge/CMakeLists.txt | 1 + ge/common/CMakeLists.txt | 2 ++ ge/ge_local_engine/CMakeLists.txt | 5 +++++ ge/ge_runtime/CMakeLists.txt | 1 + ge/graph/build/memory/CMakeLists.txt | 1 + ge/host_cpu_engine/CMakeLists.txt | 5 +++++ ge/plugin/engine/CMakeLists.txt | 1 + 7 files changed, 16 insertions(+) diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index 306b3eda..0325a7de 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -768,6 +768,7 @@ add_library(opensrc_ascendcl SHARED 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 1598ffd5..d2b8c8e7 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -133,6 +133,7 @@ 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 @@ -181,6 +182,7 @@ 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/ge_local_engine/CMakeLists.txt b/ge/ge_local_engine/CMakeLists.txt index 7189e8ff..f963730b 100755 --- a/ge/ge_local_engine/CMakeLists.txt +++ b/ge/ge_local_engine/CMakeLists.txt @@ -31,6 +31,7 @@ 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 @@ -72,6 +73,7 @@ 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 @@ -117,6 +119,7 @@ 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 @@ -158,6 +161,7 @@ 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 @@ -205,6 +209,7 @@ 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 ce1b89ea..ca770b15 100644 --- a/ge/ge_runtime/CMakeLists.txt +++ b/ge/ge_runtime/CMakeLists.txt @@ -27,6 +27,7 @@ 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 index 126e0187..f6f56a54 100644 --- a/ge/graph/build/memory/CMakeLists.txt +++ b/ge/graph/build/memory/CMakeLists.txt @@ -20,6 +20,7 @@ target_compile_options(ge_memory PRIVATE target_compile_definitions(ge_memory PRIVATE google=ascend_private LOG_CPP + $<$:ONLY_COMPILE_OPEN_SRC> ) target_link_libraries(ge_memory PRIVATE diff --git a/ge/host_cpu_engine/CMakeLists.txt b/ge/host_cpu_engine/CMakeLists.txt index cbd0bd8b..f20f810e 100644 --- a/ge/host_cpu_engine/CMakeLists.txt +++ b/ge/host_cpu_engine/CMakeLists.txt @@ -25,6 +25,7 @@ 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 @@ -65,6 +66,7 @@ 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 @@ -109,6 +111,7 @@ 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 @@ -149,6 +152,7 @@ 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 @@ -195,6 +199,7 @@ 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/plugin/engine/CMakeLists.txt b/ge/plugin/engine/CMakeLists.txt index f6353231..65d5a8a1 100644 --- a/ge/plugin/engine/CMakeLists.txt +++ b/ge/plugin/engine/CMakeLists.txt @@ -14,6 +14,7 @@ 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 From 941dcdc7aa95b5ad541e05c860c9745df99a84ea Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Wed, 30 Dec 2020 14:38:18 +0800 Subject: [PATCH 12/12] add macro --- ge/offline/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index d195e06f..cb6a3a50 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -30,6 +30,7 @@ target_compile_definitions(atc PRIVATE COMPILE_OMG_PACKAGE google=ascend_private LOG_CPP + $<$:ONLY_COMPILE_OPEN_SRC> ) target_include_directories(atc PRIVATE @@ -92,6 +93,7 @@ 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 @@ -152,6 +154,7 @@ target_compile_options(fwk_atc.bin PRIVATE -O2 -Wno-deprecated-declarations -fno-common + $<$:ONLY_COMPILE_OPEN_SRC> ) target_compile_definitions(fwk_atc.bin PRIVATE