File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
tensorflow/core/profiler/convert Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -356,14 +356,15 @@ void AggregatePerModelInferenceStats(InferenceStats* inference_stats) {
356
356
for (const RequestDetail& r : per_model_stats.request_details ()) {
357
357
// Aggregate all data.
358
358
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
+ }
367
368
}
368
369
}
369
370
You can’t perform that action at this time.
0 commit comments