提交 be738a64 编写于 作者: Q Qiao Longfei

add some debug infor

上级 62549e07
......@@ -68,6 +68,12 @@ FeedFetchList AsyncSSAGraphExecutor::Run(
if (pool_) {
run_futures.emplace_back(pool_->enqueue(std::move(call)));
} else {
fetch_data.emplace_back(std::move(call()));
}
}
if (pool_) {
for (auto &f : run_futures) {
if (exception_holder_.IsCaught()) {
f.wait();
......@@ -75,9 +81,6 @@ FeedFetchList AsyncSSAGraphExecutor::Run(
fetch_data.emplace_back(std::move(f.get()));
}
}
} else {
fetch_data.emplace_back(std::move(call()));
}
}
if (exception_holder_.IsCaught()) {
......
......@@ -249,6 +249,8 @@ void MultiDevSSAGraphBuilderBase::InsertScaleLossGradOp(
break;
}
VLOG(3) << "loss_scale: " << loss_scale;
if (loss_scale) {
// TODO(paddle-dev): Why is there no input for this op_handle?
auto loss_grad_name = node->Op()->OutputArgumentNames()[0];
......
......@@ -271,16 +271,14 @@ std::string GenParentScopeTreeDebugInfo(Scope* leaf) {
while (current_scope != nullptr) {
scopes.push_back(current_scope);
current_scope = current_scope->parent();
// end of a level
os << "\n------------------------------------------\n";
}
os << "\nDetails:\n\n";
os << "\n--------------GenParentScopeTreeDebugInfo--------------\n";
for (auto* q : scopes) {
os << "====\n";
os << q << ":\n";
for (auto& var : q->LocalVarNames()) {
for (int i = scopes.size() - 1; i >= 0; --i) {
os << "=======level [" << i << "]=======\n";
os << scopes[i] << ":\n";
for (auto& var : scopes[i]->LocalVarNames()) {
os << " - " << var << "\n";
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册