Browse Source

fix the bug about load parameter value

tags/v1.6.0
yelihua 4 years ago
parent
commit
4756edac1a
2 changed files with 17 additions and 24 deletions
  1. +17
    -0
      mindspore/ccsrc/runtime/framework/actor/debug_actor.cc
  2. +0
    -24
      mindspore/ccsrc/vm/backend.cc

+ 17
- 0
mindspore/ccsrc/runtime/framework/actor/debug_actor.cc View File

@@ -77,7 +77,24 @@ void DebugActor::DebugOnStepBegin(std::vector<KernelGraphPtr> graphs, std::vecto
OpContext<DeviceTensor> *const op_context, const AID *from_aid) {
MS_EXCEPTION_IF_NULL(op_context);
MS_EXCEPTION_IF_NULL(from_aid);
#ifdef ENABLE_DEBUGGER
auto debugger = Debugger::GetInstance();
if (debugger != nullptr && debugger->DebuggerBackendEnabled()) {
debugger->PreExecuteGraphDebugger(graphs);
}
#endif

#ifndef ENABLE_SECURITY
if (DumpJsonParser::GetInstance().e2e_dump_enabled()) {
DumpJsonParser::GetInstance().ClearGraph();
for (size_t i = 0; i < graphs.size(); ++i) {
MS_EXCEPTION_IF_NULL(device_contexts[i]);
if (device_contexts[i]->GetDeviceAddressType() == device::DeviceAddressType::kCPU) {
DumpJsonParser::GetInstance().SaveGraph(graphs[i].get());
}
}
}
#endif
// Call back to the from actor to process after debug finished.
Async(*from_aid, &DebugAwareActor::OnDebugFinish, op_context);
}


+ 0
- 24
mindspore/ccsrc/vm/backend.cc View File

@@ -699,26 +699,6 @@ bool IsGraphOutputValueNodeOrParameter(const AnfNodePtr &graph_output, const Vec
}
return false;
}

void PrepareForDebuggr(const GraphCompilerInfo &graph_compiler_info) {
#ifdef ENABLE_DEBUGGER
if (Debugger::GetInstance()->DebuggerBackendEnabled()) {
Debugger::GetInstance()->PreExecuteGraphDebugger(graph_compiler_info.graphs_);
}
#endif

#ifndef ENABLE_SECURITY
if (DumpJsonParser::GetInstance().e2e_dump_enabled()) {
DumpJsonParser::GetInstance().ClearGraph();
for (size_t i = 0; i < graph_compiler_info.graphs_.size(); ++i) {
MS_EXCEPTION_IF_NULL(graph_compiler_info.device_contexts_[i]);
if (graph_compiler_info.device_contexts_[i]->GetDeviceAddressType() == device::DeviceAddressType::kCPU) {
DumpJsonParser::GetInstance().SaveGraph(graph_compiler_info.graphs_[i].get());
}
}
}
#endif
}
} // namespace

void MindRTBackend::RunGraphBySingleOp(const std::vector<KernelGraphPtr> &graphs,
@@ -834,10 +814,6 @@ void MindRTBackend::RunGraph(const ActorInfo &actor_info, const VectorRef &args,
RunGraphBySingleOp(graph_compiler_info.graphs_, input_tensors, outputs);
return;
}

// Debugger pre-execute graph.
PrepareForDebuggr(graph_compiler_info);

// Run actor DAG.
mindspore::ScopedLongRunning long_running;
const auto &actor_set = runtime::GraphScheduler::GetInstance().Fetch(actor_info);


Loading…
Cancel
Save