!760 device os log missing

From: @taoxiangdong
Reviewed-by: @youui,@ji_chen
Signed-off-by: @ji_chen
pull/760/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit c2fb4adbce

@ -620,6 +620,7 @@ 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
@ -687,6 +688,7 @@ target_compile_definitions(ge_compiler PRIVATE
FMK_HOST_INFER FMK_HOST_INFER
COMPILE_OMG_PACKAGE COMPILE_OMG_PACKAGE
google=ascend_private google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
) )
target_compile_options(ge_compiler PRIVATE target_compile_options(ge_compiler PRIVATE

@ -32,6 +32,9 @@
#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"
#endif
using domi::OpRegistry; using domi::OpRegistry;
using std::map; using std::map;
@ -129,6 +132,11 @@ 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) {
GELOGW("Dlog report device log initialize failed.");
}
#endif
return GEInitializeImpl(options); return GEInitializeImpl(options);
} }
@ -143,6 +151,11 @@ 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) {
GELOGW("Dlog report device log initialize failed.");
}
#endif
return GEInitializeImpl(str_options); return GEInitializeImpl(str_options);
} }
@ -187,6 +200,12 @@ 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) {
GELOGW("Dlog report device log finalize failed.");
}
#endif
GELOGT(TRACE_STOP, "GEFinalize finished"); GELOGT(TRACE_STOP, "GEFinalize finished");
return ret; return ret;
} }

@ -802,6 +802,7 @@ 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

Loading…
Cancel
Save