!20225 Fix for multigraph WP hit issue

Merge pull request !20225 from parastooashtari/mg_wp
This commit is contained in:
i-robot 2021-07-14 01:51:33 +00:00 committed by Gitee
commit 20534c699c
3 changed files with 3 additions and 5 deletions

View File

@ -828,8 +828,8 @@ std::vector<std::shared_ptr<TensorData>> DebugServices::ReadNeededDumpedTensors(
std::map<std::tuple<uint32_t, uint32_t>, std::vector<std::tuple<std::string, bool>>> device_and_graph_to_nodes;
for (auto w_table_item : watchpoint_table) {
auto wp = std::get<1>(w_table_item);
unsigned int index = 0;
for (auto check_node : wp.check_node_list) {
unsigned int index = 0;
std::vector<uint32_t> devices = std::get<1>(wp.check_node_device_list[index]);
std::vector<uint32_t> graphs = std::get<1>(wp.check_node_graph_list[index]);
for (auto device : devices) {
@ -859,7 +859,6 @@ std::vector<std::shared_ptr<TensorData>> DebugServices::ReadNeededDumpedTensors(
for (auto node : wp_nodes) {
std::string orig_name = std::get<0>(node);
std::string dump_style_name = orig_name;
if (is_sync_mode) {
// In sync mode, remove the scope from the fully qualified name to compare.
GetNodeNameWithoutScope(&dump_style_name);

View File

@ -589,8 +589,8 @@ void Debugger::CheckDatasetGraph() {
bool Debugger::CheckDatasetGraph(const KernelGraphPtr &graph_ptr) {
const auto &nodes = graph_ptr->execution_order();
for (const auto &node : nodes) {
auto node_name = AnfAlgo::GetCNodeName(node);
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;
@ -1380,7 +1380,6 @@ void Debugger::ClearCurrentData() {
if ((device_target_ == kGPUDevice) && (debugger_enabled_ || device::KernelRuntime::DumpDataEnabledIteration())) {
if (debug_services_) {
debug_services_->EmptyCurrentTensor();
} else {
MS_LOG(ERROR) << "debug_services_ is nullptr";
}

View File

@ -55,7 +55,7 @@ void DebugActor::Debug(const AnfNodePtr &node, const KernelLaunchInfo *launch_in
#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
// 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);