Browse Source

!9792 unify debugger terminate across platforms

From: @john_tzanakakis
Reviewed-by: @mikef,@nsyca,@robingrosman
Signed-off-by:
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
0b1bc3b9ce
1 changed files with 2 additions and 12 deletions
  1. +2
    -12
      mindspore/ccsrc/debug/debugger/debugger.cc

+ 2
- 12
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -763,18 +763,8 @@ std::list<TensorProto> Debugger::LoadTensors(const ProtoVector<TensorProto> &ten

void Debugger::Exit() {
// clear resource before exit
// For node level, debugger has to exit itself because main thread can only exit in step bundary;
// For step level, debugger will notify main thread to exit;
if (run_level_ == "node") {
pipeline::ClearResAtexit();
exit(1);
} else if (run_level_ == "step" || device_target_ == kAscendDevice) {
// Notify main thread to terminate
pipeline::ExecutorPy::DebugTerminate(true);
} else {
pipeline::ClearResAtexit();
exit(1);
}
// debugger will notify main thread to exit because main thread can only exit at step boundary
pipeline::ExecutorPy::DebugTerminate(true);
}

std::list<WatchpointHit> Debugger::CheckWatchpoints(const std::string &watchnode, const CNodePtr &kernel,


Loading…
Cancel
Save