Skip to content

Commit f9a5254

Browse files
authored
Use time_costs_total for output_stats (microsoft#26313)
### Description - Use total inference time instead of the submission time for output statistics calculation ### Motivation and Context - The min, max, and other statistics reported for inference were using device submission time instead of the inference time. @ishwar-raut1 @gaugarg-nv @thevishalagarwal @umangb-09 @gedoensmax
1 parent 06ac0d4 commit f9a5254

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

onnxruntime/test/perftest/performance_runner.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void PerformanceResult::DumpToFile(const std::basic_string<ORTCHAR_T>& path, boo
6969
}
7070

7171
if (have_file) {
72-
for (size_t runs = 0; runs < time_costs_submission.size(); runs++) {
73-
outfile << model_name << "," << time_costs_submission[runs] << "," << peak_workingset_size << ","
72+
for (size_t runs = 0; runs < time_costs_total.size(); runs++) {
73+
outfile << model_name << "," << time_costs_total[runs] << "," << peak_workingset_size << ","
7474
<< average_CPU_usage << "," << runs << std::endl;
7575
}
7676
} else {
@@ -80,8 +80,8 @@ void PerformanceResult::DumpToFile(const std::basic_string<ORTCHAR_T>& path, boo
8080
<< "\nRuns:" << time_costs_submission.size() << std::endl;
8181
}
8282

83-
if (!time_costs_submission.empty() && f_include_statistics) {
84-
std::vector<double> sorted_time = time_costs_submission;
83+
if (!time_costs_total.empty() && f_include_statistics) {
84+
std::vector<double> sorted_time = time_costs_total;
8585

8686
size_t total = sorted_time.size();
8787
size_t n50 = static_cast<size_t>(total * 0.5);

0 commit comments

Comments
 (0)