| @@ -654,7 +654,6 @@ target_compile_definitions(ge_runner PRIVATE | |||||
| FMK_SUPPORT_DUMP | FMK_SUPPORT_DUMP | ||||
| DAVINCI_CLOUD | DAVINCI_CLOUD | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_compile_options(ge_runner PRIVATE | target_compile_options(ge_runner PRIVATE | ||||
| @@ -32,9 +32,7 @@ | |||||
| #include "graph/common/ge_call_wrapper.h" | #include "graph/common/ge_call_wrapper.h" | ||||
| #include "register/op_registry.h" | #include "register/op_registry.h" | ||||
| #include "common/ge/tbe_plugin_manager.h" | #include "common/ge/tbe_plugin_manager.h" | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| #include "toolchain/plog.h" | #include "toolchain/plog.h" | ||||
| #endif | |||||
| using domi::OpRegistry; | using domi::OpRegistry; | ||||
| using std::map; | using std::map; | ||||
| @@ -132,11 +130,9 @@ Status GEInitializeImpl(const std::map<string, string> &options) { | |||||
| // Initialize GE, prepare for execution, call GELib::Initialize | // Initialize GE, prepare for execution, call GELib::Initialize | ||||
| Status GEInitialize(const std::map<string, string> &options) { | Status GEInitialize(const std::map<string, string> &options) { | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| if (DlogReportInitialize() != SUCCESS) { | if (DlogReportInitialize() != SUCCESS) { | ||||
| GELOGW("Dlog report device log initialize failed."); | GELOGW("Dlog report device log initialize failed."); | ||||
| } | } | ||||
| #endif | |||||
| return GEInitializeImpl(options); | return GEInitializeImpl(options); | ||||
| } | } | ||||
| @@ -151,11 +147,9 @@ Status GEInitialize(const std::map<AscendString, AscendString> &options) { | |||||
| std::string val = option.second.GetString(); | std::string val = option.second.GetString(); | ||||
| str_options[key] = val; | str_options[key] = val; | ||||
| } | } | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| if (DlogReportInitialize() != SUCCESS) { | if (DlogReportInitialize() != SUCCESS) { | ||||
| GELOGW("Dlog report device log initialize failed."); | GELOGW("Dlog report device log initialize failed."); | ||||
| } | } | ||||
| #endif | |||||
| return GEInitializeImpl(str_options); | return GEInitializeImpl(str_options); | ||||
| } | } | ||||
| @@ -200,11 +194,9 @@ Status GEFinalize() { | |||||
| // to avoid memory fragment, use malloc_trim to back free stack to system | // to avoid memory fragment, use malloc_trim to back free stack to system | ||||
| malloc_trim(0); | malloc_trim(0); | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| if (DlogReportFinalize() != SUCCESS) { | if (DlogReportFinalize() != SUCCESS) { | ||||
| GELOGW("Dlog report device log finalize failed."); | GELOGW("Dlog report device log finalize failed."); | ||||
| } | } | ||||
| #endif | |||||
| GELOGT(TRACE_STOP, "GEFinalize finished"); | GELOGT(TRACE_STOP, "GEFinalize finished"); | ||||
| return ret; | return ret; | ||||
| @@ -37,10 +37,7 @@ enum FrameworkType { | |||||
| MINDSPORE = 1, | MINDSPORE = 1, | ||||
| TENSORFLOW = 3, | TENSORFLOW = 3, | ||||
| ANDROID_NN, | ANDROID_NN, | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| ONNX, | ONNX, | ||||
| #endif | |||||
| FRAMEWORK_RESERVED, | |||||
| }; | }; | ||||
| enum OpEngineType { | enum OpEngineType { | ||||
| @@ -65,7 +65,6 @@ class ModelParser { | |||||
| */ | */ | ||||
| virtual Status ParseFromMemory(const char *data, uint32_t size, ge::ComputeGraphPtr &graph) = 0; | virtual Status ParseFromMemory(const char *data, uint32_t size, ge::ComputeGraphPtr &graph) = 0; | ||||
| #ifndef ONLY_COMPILE_OPEN_SRC | |||||
| /** | /** | ||||
| * @ingroup domi_omg | * @ingroup domi_omg | ||||
| * @brief Parse relevant data from memory and save it to graph | * @brief Parse relevant data from memory and save it to graph | ||||
| @@ -77,7 +76,6 @@ class ModelParser { | |||||
| * @author | * @author | ||||
| */ | */ | ||||
| virtual Status ParseFromMemory(const char *data, uint32_t size, ge::Graph &graph) = 0; | virtual Status ParseFromMemory(const char *data, uint32_t size, ge::Graph &graph) = 0; | ||||
| #endif | |||||
| /** | /** | ||||
| * @ingroup domi_omg | * @ingroup domi_omg | ||||
| @@ -723,7 +723,6 @@ add_library(ge_ut_common STATIC ${COMMON_SRC_FILES} ${PROTO_SRCS} ${PROTO_HDRS}) | |||||
| target_compile_definitions(ge_ut_common PRIVATE | target_compile_definitions(ge_ut_common PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_link_libraries(ge_ut_common PRIVATE | target_link_libraries(ge_ut_common PRIVATE | ||||
| @@ -738,7 +737,6 @@ add_library(ge_ut_common_format STATIC ${COMMON_SRC_FILES} ${COMMON_FORMAT_SRC_F | |||||
| target_compile_definitions(ge_ut_common_format PRIVATE | target_compile_definitions(ge_ut_common_format PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_link_libraries(ge_ut_common_format PRIVATE | target_link_libraries(ge_ut_common_format PRIVATE | ||||
| @@ -795,7 +793,6 @@ add_library(ge_load_common STATIC ${GRAPH_LOAD_COMMON_SRC_FILES} ${PROTO_SRCS} $ | |||||
| target_compile_definitions(ge_load_common PRIVATE | target_compile_definitions(ge_load_common PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_link_libraries(ge_load_common PRIVATE | target_link_libraries(ge_load_common PRIVATE | ||||
| @@ -810,7 +807,6 @@ add_library(ge_execute_common STATIC ${GRAPH_EXECUTE_COMMON_SRC_FILES} ${PROTO_S | |||||
| target_compile_definitions(ge_execute_common PRIVATE | target_compile_definitions(ge_execute_common PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_link_libraries(ge_execute_common PRIVATE | target_link_libraries(ge_execute_common PRIVATE | ||||
| @@ -825,7 +821,6 @@ add_library(ge_build_common STATIC ${GRAPH_BUILD_COMMON_SRC_FILES} ${PROTO_SRCS} | |||||
| target_compile_definitions(ge_build_common PRIVATE | target_compile_definitions(ge_build_common PRIVATE | ||||
| google=ascend_private | google=ascend_private | ||||
| $<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC> | |||||
| ) | ) | ||||
| target_link_libraries(ge_build_common PRIVATE | target_link_libraries(ge_build_common PRIVATE | ||||