From 17bfe3f6bedf17289297a6e031ffc973bbf3e82c Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 9 Apr 2018 17:12:49 +0800 Subject: [PATCH] Change to avoid GCC4.8 bug --- .../fluid/framework/details/multi_devices_graph_builder.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/details/multi_devices_graph_builder.cc b/paddle/fluid/framework/details/multi_devices_graph_builder.cc index 01f5da96316..e7a0cb678eb 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_builder.cc +++ b/paddle/fluid/framework/details/multi_devices_graph_builder.cc @@ -59,7 +59,11 @@ std::unique_ptr MultiDevSSAGraphBuilder::Build( auto graph = new SSAGraph(); SSAGraph &result = *graph; std::unordered_set og_has_been_broadcast; - result.vars_.resize(places_.size()); + + // We cannot invoke resize. It is a bug of GCC 4.8 + result.vars_ = std::vector< + std::unordered_map>>>( + places_.size()); bool is_forwarding = true; for (auto *op : program.Block(0).AllOps()) { -- GitLab