From 40718b1fe2d919cc11ae476b3ed9f23408fb9fee Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 6 Nov 2024 12:01:03 -0800 Subject: [PATCH 1/3] Fix two trivial build errors - Missing #include in halide_test_dirs.h - ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result] in parallel_scenarios.cpp --- test/common/halide_test_dirs.h | 1 + test/performance/parallel_scenarios.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/common/halide_test_dirs.h b/test/common/halide_test_dirs.h index 81bf7879c748..91f9fbcf2acb 100644 --- a/test/common/halide_test_dirs.h +++ b/test/common/halide_test_dirs.h @@ -6,6 +6,7 @@ #include #include +#include #ifdef _WIN32 #ifndef NOMINMAX diff --git a/test/performance/parallel_scenarios.cpp b/test/performance/parallel_scenarios.cpp index 09ce439c828f..2fe9c0ad0bbd 100644 --- a/test/performance/parallel_scenarios.cpp +++ b/test/performance/parallel_scenarios.cpp @@ -37,7 +37,7 @@ int main(int argc, char **argv) { auto bench_one = [&]() { auto t1 = std::chrono::high_resolution_clock::now(); - callable(i, o, memory_limit, in, out); + (void)callable(i, o, memory_limit, in, out); auto t2 = std::chrono::high_resolution_clock::now(); return 1e9 * std::chrono::duration(t2 - t1).count() / (i * o); }; From b7efcc9100caa3ae73f483b9187343c93aabd597 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 6 Nov 2024 13:32:39 -0800 Subject: [PATCH 2/3] Update halide_test_dirs.h --- test/common/halide_test_dirs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/halide_test_dirs.h b/test/common/halide_test_dirs.h index 91f9fbcf2acb..dbca63f4e840 100644 --- a/test/common/halide_test_dirs.h +++ b/test/common/halide_test_dirs.h @@ -5,8 +5,8 @@ // include Halide.h #include -#include #include +#include #ifdef _WIN32 #ifndef NOMINMAX From 7d3dbb9c6f931121138628544f968d3fa16f12f3 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 6 Nov 2024 13:34:15 -0800 Subject: [PATCH 3/3] Update parallel_scenarios.cpp --- test/performance/parallel_scenarios.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/performance/parallel_scenarios.cpp b/test/performance/parallel_scenarios.cpp index 2fe9c0ad0bbd..41e590599eb3 100644 --- a/test/performance/parallel_scenarios.cpp +++ b/test/performance/parallel_scenarios.cpp @@ -37,6 +37,7 @@ int main(int argc, char **argv) { auto bench_one = [&]() { auto t1 = std::chrono::high_resolution_clock::now(); + // Ignore error code because default halide_error() will abort on failure (void)callable(i, o, memory_limit, in, out); auto t2 = std::chrono::high_resolution_clock::now(); return 1e9 * std::chrono::duration(t2 - t1).count() / (i * o);