Skip to content

Commit

Permalink
Change to avoid GCC4.8 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
reyoung committed Apr 9, 2018
1 parent ad40faa commit bbb5707
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ std::unique_ptr<SSAGraph> MultiDevSSAGraphBuilder::Build(
auto graph = new SSAGraph();
SSAGraph &result = *graph;
std::unordered_set<std::string> 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<std::string, std::vector<std::unique_ptr<VarHandle>>>>(
places_.size());

bool is_forwarding = true;
for (auto *op : program.Block(0).AllOps()) {
Expand Down

0 comments on commit bbb5707

Please sign in to comment.