8000 Reverts changelist 723349025 · linux-on-ibm-z/tensorflow@af03154 · GitHub
[go: up one dir, main page]

Skip to content

Commit af03154

Browse files
zzzariestensorflower-gardener
authored andcommitted
Reverts changelist 723349025
PiperOrigin-RevId: 731085146
1 parent 2bb741a commit af03154

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tensorflow/core/profiler/convert/inference_stats_grouping.cc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,15 @@ void AggregatePerModelInferenceStats(InferenceStats* inference_stats) {
356356
for (const RequestDetail& r : per_model_stats.request_details()) {
357357
// Aggregate all data.
358358
AggregateRequest(r, &aggregated_r);
359-
// Aggregate per batch size for request included in only one batch.
360-
if (r.related_batch_ids_size() != 1) continue;
361-
if (const BatchDetail* batch = ::tsl::gtl::FindPtrOrNull(
362-
batch_id_to_batch, r.related_batch_ids(0))) {
363-
int batch_size = batch->batch_size_after_padding();
364-
auto& info = per_batch_size_info[batch_size];
365-
AggregateRequest(r, info.result.mutable_aggregated_request_result());
366-
info.request_count++;
359+
// Aggregate per batch size.
360+
for (const auto batch_id : r.related_batch_ids()) {
361+
if (const BatchDetail* batch =
362+
::tsl::gtl::FindPtrOrNull(batch_id_to_batch, batch_id)) {
363+
int batch_size = batch->batch_size_after_padding();
364+
auto& info = per_batch_size_info[batch_size];
365+
AggregateRequest(r, info.result.mutable_aggregated_request_result());
366+
info.request_count++;
367+
}
367368
}
368369
}
369370

0 commit comments

Comments
 (0)
0