From d2f6dd1a32626218524b04994f57166f3ac2cc30 Mon Sep 17 00:00:00 2001 From: Parastoo Ashtari Date: Thu, 15 Jul 2021 19:29:48 -0400 Subject: [PATCH] remove CheckDatasetGraph from debug_actor.cc --- mindspore/ccsrc/debug/debugger/debugger.cc | 14 -------------- mindspore/ccsrc/debug/debugger/debugger.h | 2 -- .../ccsrc/runtime/framework/actor/debug_actor.cc | 9 --------- 3 files changed, 25 deletions(-) diff --git a/mindspore/ccsrc/debug/debugger/debugger.cc b/mindspore/ccsrc/debug/debugger/debugger.cc index 67cd9740376..9afc6b44919 100644 --- a/mindspore/ccsrc/debug/debugger/debugger.cc +++ b/mindspore/ccsrc/debug/debugger/debugger.cc @@ -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); diff --git a/mindspore/ccsrc/debug/debugger/debugger.h b/mindspore/ccsrc/debug/debugger/debugger.h index ecf4b516192..d171848aadf 100644 --- a/mindspore/ccsrc/debug/debugger/debugger.h +++ b/mindspore/ccsrc/debug/debugger/debugger.h @@ -170,8 +170,6 @@ class Debugger : public std::enable_shared_from_this { // check if dump using debugger backend is enabled bool CheckDebuggerDumpEnabled() const; - bool CheckDatasetGraph(const KernelGraphPtr &graph_ptr); - private: // private constructor for singleton Debugger(); diff --git a/mindspore/ccsrc/runtime/framework/actor/debug_actor.cc b/mindspore/ccsrc/runtime/framework/actor/debug_actor.cc index f76e4f934de..f9e23452079 100644 --- a/mindspore/ccsrc/runtime/framework/actor/debug_actor.cc +++ b/mindspore/ccsrc/runtime/framework/actor/debug_actor.cc @@ -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(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();