Browse Source

add 'The function call stack:' to the begin of DumpSourceLines print

tags/v1.6.0
huanghui 4 years ago
parent
commit
bcbd9fd26e
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      mindspore/core/utils/trace_base.cc

+ 4
- 2
mindspore/core/utils/trace_base.cc View File

@@ -146,11 +146,13 @@ std::string DumpSourceLines(const AnfNodePtr &node) {
return "";
}
std::ostringstream oss;
oss << "\n";
for (auto &src_info : vec_source) {
oss << src_info;
}
return oss.str();
if (oss.str().empty()) {
return "";
}
return "\nThe function call stack:\n" + oss.str();
}

std::string DumpSourceLines(AnfNode *node) {


Loading…
Cancel
Save