add some debug infor

mixed_precision_init
Qiao Longfei 6 years ago
parent 62549e0714
commit be738a646e

@ -68,18 +68,21 @@ FeedFetchList AsyncSSAGraphExecutor::Run(
if (pool_) {
run_futures.emplace_back(pool_->enqueue(std::move(call)));
for (auto &f : run_futures) {
if (exception_holder_.IsCaught()) {
f.wait();
} else {
fetch_data.emplace_back(std::move(f.get()));
}
}
} else {
fetch_data.emplace_back(std::move(call()));
}
}
if (pool_) {
for (auto &f : run_futures) {
if (exception_holder_.IsCaught()) {
f.wait();
} else {
fetch_data.emplace_back(std::move(f.get()));
}
}
}
if (exception_holder_.IsCaught()) {
exception_holder_.ReThrow();
}

@ -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";
}
}

Loading…
Cancel
Save