!20384 Fix for SinGAN net run into forever loop on GPU.

Merge pull request !20384 from parastooashtari/multigraph
This commit is contained in:
i-robot 2021-07-16 06:51:29 +00:00 committed by Gitee
commit 51bb146e1a
3 changed files with 0 additions and 25 deletions

View File

@ -586,20 +586,6 @@ void Debugger::CheckDatasetGraph() {
is_dataset_graph_ = false;
}
bool Debugger::CheckDatasetGraph(const KernelGraphPtr &graph_ptr) {
const auto &nodes = graph_ptr->execution_order();
for (const auto &node : nodes) {
MS_LOG(INFO) << "node: " << GetKernelNodeName(node);
auto node_name = AnfAlgo::GetCNodeName(node);
if (node_name == "GetNext" || node_name == "InitDataSetQueue") {
MS_LOG(INFO) << "Not enabling debugger for graph " << graph_ptr->graph_id() << ": found dataset graph node "
<< node_name;
return true;
}
}
return false;
}
GraphProto Debugger::GetGraphProto(const KernelGraphPtr &graph_ptr) const {
// convert kernel graph to debugger modelproto
ModelProto model = GetDebuggerFuncGraphProto(graph_ptr);

View File

@ -170,8 +170,6 @@ class Debugger : public std::enable_shared_from_this<Debugger> {
// check if dump using debugger backend is enabled
bool CheckDebuggerDumpEnabled() const;
bool CheckDatasetGraph(const KernelGraphPtr &graph_ptr);
private:
// private constructor for singleton
Debugger();

View File

@ -27,7 +27,6 @@
#include "debug/debugger/debugger_utils.h"
#endif
using KernelGraph = mindspore::session::KernelGraph;
namespace mindspore {
namespace runtime {
@ -53,14 +52,6 @@ void DebugActor::Debug(const AnfNodePtr &node, const KernelLaunchInfo *launch_in
}
} else if (device_context->GetDeviceAddressType() == device::DeviceAddressType::kGPU) {
#ifdef ENABLE_DEBUGGER
auto kernel_graph = std::dynamic_pointer_cast<KernelGraph>(cnode->func_graph());
MS_EXCEPTION_IF_NULL(kernel_graph);
// Debugger is not enabled for dataset graphs.
if (Debugger::GetInstance()->CheckDatasetGraph(kernel_graph)) {
// Call back to the from actor to process after debug finished.
Async(*from_aid, &DebugAwareActor::OnDebugFinish, op_context);
return;
}
auto debugger = Debugger::GetInstance();
if (debugger) {
std::string kernel_name = cnode->fullname_with_scope();