forked from mindspore-Ecosystem/mindspore
!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:
commit
c218e33b1e
|
@ -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();
|
||||
|
|
|
@ -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…
Reference in New Issue