Browse Source

!814 add macro

From: @chen_yemeng
Reviewed-by: 
Signed-off-by:
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
7b90d6ed56
12 changed files with 32 additions and 2 deletions
  1. +1
    -0
      ge/CMakeLists.txt
  2. +3
    -0
      ge/common/CMakeLists.txt
  3. +5
    -0
      ge/ge_local_engine/CMakeLists.txt
  4. +1
    -0
      ge/ge_runtime/CMakeLists.txt
  5. +1
    -0
      ge/graph/build/memory/CMakeLists.txt
  6. +5
    -0
      ge/host_cpu_engine/CMakeLists.txt
  7. +3
    -0
      ge/offline/CMakeLists.txt
  8. +1
    -0
      ge/plugin/engine/CMakeLists.txt
  9. +1
    -1
      metadef
  10. +1
    -1
      parser
  11. +1
    -0
      tests/ut/common/graph/CMakeLists.txt
  12. +9
    -0
      tests/ut/ge/CMakeLists.txt

+ 1
- 0
ge/CMakeLists.txt View File

@@ -768,6 +768,7 @@ add_library(opensrc_ascendcl SHARED


target_compile_definitions(opensrc_ascendcl PRIVATE target_compile_definitions(opensrc_ascendcl PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_compile_options(opensrc_ascendcl PRIVATE target_compile_options(opensrc_ascendcl PRIVATE


+ 3
- 0
ge/common/CMakeLists.txt View File

@@ -73,6 +73,7 @@ target_compile_definitions(ge_common PRIVATE
FMK_SUPPORT_DUMP FMK_SUPPORT_DUMP
OS_CENTOS OS_CENTOS
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_compile_options(ge_common PRIVATE target_compile_options(ge_common PRIVATE
@@ -132,6 +133,7 @@ target_compile_definitions(ge_common_static PRIVATE
$<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0> $<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0>
$<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX> $<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX>
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_compile_options(ge_common_static PRIVATE target_compile_options(ge_common_static PRIVATE
@@ -180,6 +182,7 @@ target_compile_definitions(ge_common PRIVATE
FMK_SUPPORT_DUMP FMK_SUPPORT_DUMP
OS_CENTOS OS_CENTOS
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_compile_options(ge_common PRIVATE target_compile_options(ge_common PRIVATE


+ 5
- 0
ge/ge_local_engine/CMakeLists.txt View File

@@ -31,6 +31,7 @@ target_compile_options(ge_local_engine PRIVATE


target_compile_definitions(ge_local_engine PRIVATE target_compile_definitions(ge_local_engine PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(ge_local_engine PRIVATE 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 target_compile_definitions(atc_ge_local_engine PRIVATE
COMPILE_OMG_PACKAGE COMPILE_OMG_PACKAGE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc_ge_local_engine PRIVATE 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 target_compile_definitions(ge_local_opskernel_builder PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(ge_local_opskernel_builder PRIVATE 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 target_compile_definitions(atc_ge_local_opskernel_builder PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc_ge_local_opskernel_builder PRIVATE 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 target_compile_definitions(ge_local_opskernel_builder_static PRIVATE
google=ascend_private google=ascend_private
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(ge_local_opskernel_builder_static PRIVATE target_include_directories(ge_local_opskernel_builder_static PRIVATE


+ 1
- 0
ge/ge_runtime/CMakeLists.txt View File

@@ -27,6 +27,7 @@ target_compile_options(ge_runtime PRIVATE


target_compile_definitions(ge_runtime PRIVATE target_compile_definitions(ge_runtime PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0 PROTOBUF_INLINE_NOT_IN_HEADERS=0
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(ge_runtime PRIVATE target_include_directories(ge_runtime PRIVATE


+ 1
- 0
ge/graph/build/memory/CMakeLists.txt View File

@@ -20,6 +20,7 @@ target_compile_options(ge_memory PRIVATE
target_compile_definitions(ge_memory PRIVATE target_compile_definitions(ge_memory PRIVATE
google=ascend_private google=ascend_private
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_link_libraries(ge_memory PRIVATE target_link_libraries(ge_memory PRIVATE


+ 5
- 0
ge/host_cpu_engine/CMakeLists.txt View File

@@ -25,6 +25,7 @@ target_compile_options(host_cpu_engine PRIVATE


target_compile_definitions(host_cpu_engine PRIVATE target_compile_definitions(host_cpu_engine PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(host_cpu_engine PRIVATE 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 target_compile_definitions(atc_host_cpu_engine PRIVATE
COMPILE_OMG_PACKAGE COMPILE_OMG_PACKAGE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc_host_cpu_engine PRIVATE 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 target_compile_definitions(host_cpu_opskernel_builder PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(host_cpu_opskernel_builder PRIVATE 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 target_compile_definitions(atc_host_cpu_opskernel_builder PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc_host_cpu_opskernel_builder PRIVATE 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 target_compile_definitions(host_cpu_opskernel_builder_static PRIVATE
google=ascend_private google=ascend_private
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(host_cpu_opskernel_builder_static PRIVATE target_include_directories(host_cpu_opskernel_builder_static PRIVATE


+ 3
- 0
ge/offline/CMakeLists.txt View File

@@ -30,6 +30,7 @@ target_compile_definitions(atc PRIVATE
COMPILE_OMG_PACKAGE COMPILE_OMG_PACKAGE
google=ascend_private google=ascend_private
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc PRIVATE target_include_directories(atc PRIVATE
@@ -92,6 +93,7 @@ target_compile_definitions(atc_atc.bin PRIVATE
COMPILE_OMG_PACKAGE COMPILE_OMG_PACKAGE
google=ascend_private google=ascend_private
LOG_CPP LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(atc_atc.bin PRIVATE target_include_directories(atc_atc.bin PRIVATE
@@ -152,6 +154,7 @@ target_compile_options(fwk_atc.bin PRIVATE
-O2 -O2
-Wno-deprecated-declarations -Wno-deprecated-declarations
-fno-common -fno-common
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_compile_definitions(fwk_atc.bin PRIVATE target_compile_definitions(fwk_atc.bin PRIVATE


+ 1
- 0
ge/plugin/engine/CMakeLists.txt View File

@@ -14,6 +14,7 @@ target_compile_options(engine PRIVATE
target_compile_definitions(engine PRIVATE target_compile_definitions(engine PRIVATE
REUSE_MEMORY=1 REUSE_MEMORY=1
PROTOBUF_INLINE_NOT_IN_HEADERS=0 PROTOBUF_INLINE_NOT_IN_HEADERS=0
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_include_directories(engine PRIVATE target_include_directories(engine PRIVATE


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 3044f2da694cd61f5d9946709134cbcc849190e4
Subproject commit 11c6cf2921b6a385616a3ebc601b4431b55b07db

+ 1
- 1
parser

@@ -1 +1 @@
Subproject commit ecde83dc9da0d58522b4a90c4d90c242c75011fd
Subproject commit 99437c39d26624a14060307366a96b79b1d439c3

+ 1
- 0
tests/ut/common/graph/CMakeLists.txt View File

@@ -110,6 +110,7 @@ target_compile_options(ut_libgraph PRIVATE


target_compile_definitions(ut_libgraph PRIVATE target_compile_definitions(ut_libgraph PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_link_libraries(ut_libgraph target_link_libraries(ut_libgraph


+ 9
- 0
tests/ut/ge/CMakeLists.txt View File

@@ -895,6 +895,10 @@ target_compile_options(ut_libge_others_utest PRIVATE
-g --coverage -fprofile-arcs -ftest-coverage -g --coverage -fprofile-arcs -ftest-coverage
) )


target_compile_definitions(ut_libge_others_utest PRIVATE
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_link_libraries(ut_libge_others_utest target_link_libraries(ut_libge_others_utest
$<BUILD_INTERFACE:intf_pub> $<BUILD_INTERFACE:intf_pub>
ge_load_common ge_execute_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov ge_load_common ge_execute_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov
@@ -912,6 +916,10 @@ target_compile_options(ut_libge_kernel_utest PRIVATE
-g --coverage -fprofile-arcs -ftest-coverage -g --coverage -fprofile-arcs -ftest-coverage
) )


target_compile_definitions(ut_libge_kernel_utest PRIVATE
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_link_libraries(ut_libge_kernel_utest target_link_libraries(ut_libge_kernel_utest
$<BUILD_INTERFACE:intf_pub> $<BUILD_INTERFACE:intf_pub>
ge_load_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov ge_load_common ge_ut_common gtest gtest_main ascend_protobuf ${COMMON_SHARED_LIBRARIES} json -lrt -ldl -lgcov
@@ -932,6 +940,7 @@ target_compile_options(ut_libge_distinct_load_utest PRIVATE


target_compile_definitions(ut_libge_distinct_load_utest PRIVATE target_compile_definitions(ut_libge_distinct_load_utest PRIVATE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )


target_link_libraries(ut_libge_distinct_load_utest target_link_libraries(ut_libge_distinct_load_utest


Loading…
Cancel
Save