!8750 some graph reading code is executed when debug is not enabled

From: @john_tzanakakis
Reviewed-by: @pandoublefeng
Signed-off-by:
This commit is contained in:
mindspore-ci-bot 2020-11-19 19:24:37 +08:00 committed by Gitee
commit c218e33b1e
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ GraphId AscendSession::CompileGraphImpl(NotNull<FuncGraphPtr> func_graph) {
HardwareOptimize(NOT_NULL(root_graph), NOT_NULL(&memo));
memo.clear();
// load graphs to debugger.
if (debugger_) {
if (debugger_ && debugger_->DebuggerBackendEnabled()) {
LoadGraphsToDbg(NOT_NULL(root_graph), NOT_NULL(&memo));
}
memo.clear();

View File

@ -337,7 +337,7 @@ GraphId GPUSession::CompileGraphImpl(const AnfNodePtrList &lst, const AnfNodePtr
AllocateMemory(graph.get());
#ifdef ENABLE_DEBUGGER
if (debugger_) {
if (debugger_ && debugger_->DebuggerBackendEnabled()) {
debugger_->LoadGraphs(graph);
}
#endif