Skip to content

Commit d56ad83

Browse files
frgossenGoogle-ML-Automation
authored andcommitted
[Cleanup] Use push_back instead of emplace_back where appropriate (go/totw/112)
PiperOrigin-RevId: 708167009
1 parent 1f6e939 commit d56ad83

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

xla/python/xplane_to_profile_instructions.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void GetXPlaneLatencyInfo(
117117
if (fingerprint.has_value()) {
118118
key = absl::StrCat(fingerprint.value(), kCostNameSep, hlo_name.value());
119119
}
120-
(*hlo_latency_info)[key].durations.emplace_back(latency);
120+
(*hlo_latency_info)[key].durations.push_back(latency);
121121
});
122122
});
123123
}
@@ -194,7 +194,7 @@ absl::Status ConvertXplaneUnderLogdirToProfiledInstructionsProto(
194194
tensorflow::profiler::XSpace xspace;
195195
TF_RETURN_IF_ERROR(
196196
ReadBinaryProto(tsl::Env::Default(), xspace_path, &xspace));
197-
xspaces.emplace_back(xspace);
197+
xspaces.push_back(xspace);
198198
}
199199
}
200200

xla/service/heap_simulator/heap_simulator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2334,7 +2334,7 @@ GlobalDecreasingSizeBestFitHeap<BufferType>::Finish() {
23342334
VLOG(1) << "result heap_size: " << result_.heap_size;
23352335
Result result;
23362336
result.heap_size = result_.heap_size;
2337-
result.heap_results.emplace_back(result_);
2337+
result.heap_results.push_back(result_);
23382338
return result;
23392339
}
23402340

xla/service/memory_space_assignment/algorithm.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ std::vector<MsaBufferInterval> FindCrossProgramPrefetchCandidates(
286286
interval.need_allocation = true;
287287
interval.colocations = {++buffer.values().begin(), buffer.values().end()};
288288
if (IsCrossProgramPrefetchCandidate(*value, alias_analysis, options)) {
289-
candidates.emplace_back(interval);
289+
candidates.push_back(interval);
290290
} else if (MemorySpaceAssignmentUtils::
291291
DoesCrossProgramPrefetchBufferMatchAnyFilter(
292292
options.msa_sort_order_overrides, interval)) {
293-
candidates.emplace_back(interval);
293+
candidates.push_back(interval);
294294
}
295295
}
296296

xla/service/memory_space_assignment/best_fit_repacker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ class BestFitRepacker
507507

508508
Result result;
509509
result.heap_size = result_.heap_size;
510-
result.heap_results.emplace_back(result_);
510+
result.heap_results.push_back(result_);
511511
return result;
512512
}
513513

0 commit comments

Comments
 (0)