diff --git a/paddle/fluid/framework/details/async_ssa_graph_executor.cc b/paddle/fluid/framework/details/async_ssa_graph_executor.cc index 7dc269242f228c0dfc76c93a955f7278f56227ca..c259ff4f747e3dcd24a458281964703f7551ea2c 100644 --- a/paddle/fluid/framework/details/async_ssa_graph_executor.cc +++ b/paddle/fluid/framework/details/async_ssa_graph_executor.cc @@ -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(); } diff --git a/paddle/fluid/framework/details/multi_devices_graph_pass.cc b/paddle/fluid/framework/details/multi_devices_graph_pass.cc index d7a4b5692b3c36359677eabb6a9ba9425256984c..f1347e2b0d70c6d7de3c50d3662bbd74e705391d 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_pass.cc +++ b/paddle/fluid/framework/details/multi_devices_graph_pass.cc @@ -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]; diff --git a/paddle/fluid/framework/scope.cc b/paddle/fluid/framework/scope.cc index 884ad3b34b363dacdcc373e3011e3b9191c8b80c..2c76ab22f6fd2e68f1ef81f4e7b9b6902d57c6ff 100644 --- a/paddle/fluid/framework/scope.cc +++ b/paddle/fluid/framework/scope.cc @@ -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"; } }