From 1f9b6e3223ddbea36d020a136a558d5e814a80bb Mon Sep 17 00:00:00 2001 From: Christian <28689358+christiangnrd@users.noreply.github.com> Date: Sun, 20 Jul 2025 19:07:23 -0300 Subject: [PATCH 1/3] Simplify specifying benchmark output file --- perf/runbenchmarks.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perf/runbenchmarks.jl b/perf/runbenchmarks.jl index 8d9f9d3a9c..838d121a1a 100644 --- a/perf/runbenchmarks.jl +++ b/perf/runbenchmarks.jl @@ -14,12 +14,16 @@ macro async_benchmarkable(ex...) end end +if !@isdefined(BENCHOUT) + BENCHOUT = "benchmarkresults.json" +end + # before anything else, run latency benchmarks. these spawn subprocesses, so we don't want # to do so after regular benchmarks have caused the memory allocator to reserve memory. @info "Running latency benchmarks" latency_results = include("latency.jl") -SUITE = BenchmarkGroup() +SUITE = BenchmarkGroup([BENCHOUT]) include("cuda.jl") include("kernel.jl") @@ -50,4 +54,4 @@ results["latency"] = latency_results results["integration"] = integration_results # write out the results -BenchmarkTools.save("benchmarkresults.json", median(results)) +BenchmarkTools.save(BENCHOUT, median(results)) From c618a304df5621d53d28da09568d9b2e03442649 Mon Sep 17 00:00:00 2001 From: Christian <28689358+christiangnrd@users.noreply.github.com> Date: Wed, 23 Jul 2025 15:58:38 -0300 Subject: [PATCH 2/3] Remove tag --- perf/runbenchmarks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/runbenchmarks.jl b/perf/runbenchmarks.jl index 838d121a1a..064e18c6e8 100644 --- a/perf/runbenchmarks.jl +++ b/perf/runbenchmarks.jl @@ -23,7 +23,7 @@ end @info "Running latency benchmarks" latency_results = include("latency.jl") -SUITE = BenchmarkGroup([BENCHOUT]) +SUITE = BenchmarkGroup() include("cuda.jl") include("kernel.jl") From 1942eb2459a564b5677e3599c94cccc4ecb66847 Mon Sep 17 00:00:00 2001 From: Christian <28689358+christiangnrd@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:29:14 -0300 Subject: [PATCH 3/3] Accept alternate filename as optional argument --- perf/runbenchmarks.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/perf/runbenchmarks.jl b/perf/runbenchmarks.jl index 064e18c6e8..72d8b1e76a 100644 --- a/perf/runbenchmarks.jl +++ b/perf/runbenchmarks.jl @@ -14,10 +14,6 @@ macro async_benchmarkable(ex...) end end -if !@isdefined(BENCHOUT) - BENCHOUT = "benchmarkresults.json" -end - # before anything else, run latency benchmarks. these spawn subprocesses, so we don't want # to do so after regular benchmarks have caused the memory allocator to reserve memory. @info "Running latency benchmarks" @@ -54,4 +50,5 @@ results["latency"] = latency_results results["integration"] = integration_results # write out the results -BenchmarkTools.save(BENCHOUT, median(results)) +result_file = length(ARGS) >= 1 ? ARGS[1] : "benchmarkresults.json" +BenchmarkTools.save(result_file, median(results))