From 6b57c853f18cf11f68f26ba9a54d47fb7518ea5a Mon Sep 17 00:00:00 2001 From: Luigi-Crisci Date: Thu, 22 Feb 2024 12:18:32 +0000 Subject: [PATCH] Add check for `timingResults` size when using `--warmup-run` --- include/time_metrics.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/time_metrics.h b/include/time_metrics.h index 7d13e5a3..4f3e2526 100644 --- a/include/time_metrics.h +++ b/include/time_metrics.h @@ -76,7 +76,8 @@ class TimeMetricsProcessor { if(unavailableTimings.count(name) == 0) { std::vector resultsSeconds; auto timesBegin = timingResults.at(name).begin(); - if (args.warmup_run) { + // If verification is enabled and fails, only the warmup run is executed. + if (timingResults.size() > 1 && args.warmup_run) { ++timesBegin; } std::transform(timesBegin, timingResults.at(name).end(), std::back_inserter(resultsSeconds),