Creates replica groups from the provided nested array. groups[i] represents the replica ids for group 'i'.
| 412 | // Creates replica groups from the provided nested array. groups[i] represents |
| 413 | // the replica ids for group 'i'. |
| 414 | std::vector<ReplicaGroup> CreateReplicaGroups( |
| 415 | absl::Span<const std::vector<int64>> groups) { |
| 416 | std::vector<ReplicaGroup> replica_groups; |
| 417 | absl::c_transform(groups, std::back_inserter(replica_groups), |
| 418 | [](const std::vector<int64>& ids) { |
| 419 | ReplicaGroup group; |
| 420 | *group.mutable_replica_ids() = {ids.begin(), ids.end()}; |
| 421 | return group; |
| 422 | }); |
| 423 | return replica_groups; |
| 424 | } |
| 425 | |
| 426 | bool HloParserImpl::Error(LocTy loc, absl::string_view msg) { |
| 427 | auto line_col = lexer_.GetLineAndColumn(loc); |
no test coverage detected