Browse Source

some graph reading code is executed when debug is not enabled

tags/v1.1.0
John Tzanakakis 5 years ago
parent
commit
d8f345fa57
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/session/ascend_session.cc
  2. +1
    -1
      mindspore/ccsrc/backend/session/gpu_session.cc

+ 1
- 1
mindspore/ccsrc/backend/session/ascend_session.cc 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();


+ 1
- 1
mindspore/ccsrc/backend/session/gpu_session.cc 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


Loading…
Cancel
Save