未验证 提交 95250852 编写于 作者: C Chen Weihang 提交者: GitHub

Polish some PE code details (#21274)

* polish code details, test=develop

* futher polish hint msg, test=develop
上级 0fd1281e
......@@ -55,7 +55,7 @@ void FuseOptimizerOpPass::ApplyImpl(ir::Graph *graph) const {
VLOG(6) << "Find " << fuse_op_type << " operators : " << opt_ops_num
<< ", and " << opt_nodes.size() << " for dense gradients.";
if (opt_nodes.size() == 0) return;
if (opt_nodes.size() <= 1) return;
if (result.Has(details::kFusedOptType)) {
auto &opt_type = result.Get<details::FusedOptType>(details::kFusedOptType);
VLOG(6) << "Currently only support fusing one type of optimizer op, "
......
......@@ -421,10 +421,9 @@ ParallelExecutor::ParallelExecutor(const std::vector<platform::Place> &places,
#endif
LOG(INFO) << string::Sprintf(
"The number of %s, which is used in ParallelExecutor, is %lu. And "
"the Program will be copied %lu copies",
(member_->use_cuda_ ? "CUDAPlace" : "CPUPlace"), places.size(),
places.size());
"The Program will be executed on %s using ParallelExecutor, %lu "
"cards are used, so %lu programs are executed in parallel.",
(member_->use_cuda_ ? "CUDA" : "CPU"), places.size(), places.size());
// Step 1. Bcast the bcast_vars to devs.
// Create local scopes
......
......@@ -28,7 +28,7 @@ class CUDAInplaceTestWithFuseOptimizationOps(InplaceTestBase):
self.check_single_card_fetch_var()
class CPUAInplaceTestWithFuseOptimizationOps(InplaceTestBase):
class CPUInplaceTestWithFuseOptimizationOps(InplaceTestBase):
def initParameter(self):
self.use_cuda = False
self.fuse_all_optimizer_ops = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册