From 5568c324bad71018a9480a22e1e4d60f5ea8c6d5 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 7 Jun 2022 17:46:08 +1000 Subject: [PATCH] tests/perf_bench: Add some configurations for N=32, M=10. For STM32L072 and similar, very low end targets. The other perf_bench tests run out of memory, crash, or fail on prerequisite features. Signed-off-by: Angus Gratton --- tests/perf_bench/bm_fannkuch.py | 1 + tests/perf_bench/bm_nqueens.py | 2 +- tests/perf_bench/bm_pidigits.py | 1 + tests/perf_bench/core_import_mpy_multi.py | 2 +- tests/perf_bench/core_qstr.py | 2 +- tests/run-perfbench.py | 4 +++- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/perf_bench/bm_fannkuch.py b/tests/perf_bench/bm_fannkuch.py index 9f7ae797f0..49ab05d1e9 100644 --- a/tests/perf_bench/bm_fannkuch.py +++ b/tests/perf_bench/bm_fannkuch.py @@ -51,6 +51,7 @@ def fannkuch(n): # Benchmark interface bm_params = { + (32, 10): (3,), (50, 10): (5,), (100, 10): (6,), (500, 10): (7,), diff --git a/tests/perf_bench/bm_nqueens.py b/tests/perf_bench/bm_nqueens.py index 773dd3f7ed..c5a91bf304 100644 --- a/tests/perf_bench/bm_nqueens.py +++ b/tests/perf_bench/bm_nqueens.py @@ -46,7 +46,7 @@ def n_queens(queen_count): # Benchmark interface bm_params = { - (50, 25): (1, 5), + (32, 10): (1, 5), (100, 25): (1, 6), (1000, 100): (1, 7), (5000, 100): (1, 8), diff --git a/tests/perf_bench/bm_pidigits.py b/tests/perf_bench/bm_pidigits.py index 5949b93063..bdaa73cec7 100644 --- a/tests/perf_bench/bm_pidigits.py +++ b/tests/perf_bench/bm_pidigits.py @@ -36,6 +36,7 @@ def gen_pi_digits(n): # Benchmark interface bm_params = { + (32, 10): (1, 20), (50, 25): (1, 35), (100, 100): (1, 65), (1000, 1000): (2, 250), diff --git a/tests/perf_bench/core_import_mpy_multi.py b/tests/perf_bench/core_import_mpy_multi.py index 682c36328a..99c4721d29 100644 --- a/tests/perf_bench/core_import_mpy_multi.py +++ b/tests/perf_bench/core_import_mpy_multi.py @@ -73,7 +73,7 @@ def test(r): # Benchmark interface bm_params = { - (100, 10): (50,), + (32, 10): (50,), (1000, 10): (500,), (5000, 10): (5000,), } diff --git a/tests/perf_bench/core_qstr.py b/tests/perf_bench/core_qstr.py index b87e2c0658..64d6c59e92 100644 --- a/tests/perf_bench/core_qstr.py +++ b/tests/perf_bench/core_qstr.py @@ -10,7 +10,7 @@ def test(r): # Benchmark interface bm_params = { - (100, 10): (400,), + (32, 10): (400,), (1000, 10): (4000,), (5000, 10): (40000,), } diff --git a/tests/run-perfbench.py b/tests/run-perfbench.py index a2e9e8079a..f76aa511ad 100755 --- a/tests/run-perfbench.py +++ b/tests/run-perfbench.py @@ -260,7 +260,9 @@ def main(): ) cmd_parser.add_argument("--via-mpy", action="store_true", help="compile code to .mpy first") cmd_parser.add_argument("--mpy-cross-flags", default="", help="flags to pass to mpy-cross") - cmd_parser.add_argument("N", nargs=1, help="N parameter (approximate target CPU frequency)") + cmd_parser.add_argument( + "N", nargs=1, help="N parameter (approximate target CPU frequency in MHz)" + ) cmd_parser.add_argument("M", nargs=1, help="M parameter (approximate target heap in kbytes)") cmd_parser.add_argument("files", nargs="*", help="input test files") args = cmd_parser.parse_args()