some graph reading code is executed when debug is not enabled

This commit is contained in:
John Tzanakakis 2020-11-18 15:44:38 -05:00
parent f1ef84e1a6
commit d8f345fa57
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