From 2e00d9bb91e587b061cd0cc3f46dec4da4bf2996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kami=C5=84ski?= Date: Wed, 19 Nov 2025 15:48:40 +0000 Subject: [PATCH] [Benchmarks] Add core benchmarks preset Add 'Core' Compute Benchmarks preset with SubmitKernel scenarios with the following parameters: - time measurement - all runtimes - out of order/in order queue - with/without measuring completion time - with/without using events. --- .../workflows/sycl-ur-perf-benchmarking.yml | 1 + devops/scripts/benchmarks/CONTRIB.md | 2 +- devops/scripts/benchmarks/README.md | 1 + devops/scripts/benchmarks/benches/compute.py | 35 +++++++++++++++++++ devops/scripts/benchmarks/main.py | 1 + devops/scripts/benchmarks/presets.py | 3 ++ 6 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-ur-perf-benchmarking.yml b/.github/workflows/sycl-ur-perf-benchmarking.yml index 165534ddfae8b..227abe3a9c32e 100644 --- a/.github/workflows/sycl-ur-perf-benchmarking.yml +++ b/.github/workflows/sycl-ur-perf-benchmarking.yml @@ -24,6 +24,7 @@ on: - Full - SYCL - Minimal + - Core - Normal - Test - Gromacs diff --git a/devops/scripts/benchmarks/CONTRIB.md b/devops/scripts/benchmarks/CONTRIB.md index 3ddc5e9bc1d72..6b7542d112b8a 100644 --- a/devops/scripts/benchmarks/CONTRIB.md +++ b/devops/scripts/benchmarks/CONTRIB.md @@ -209,7 +209,7 @@ Descriptions should: * If adding to an existing category, modify the corresponding `Suite` class (e.g., `benches/compute.py`) to instantiate and return your new benchmark in its `benchmarks()` method. * If creating a new category, create a new `Suite` class inheriting from `benches.base.Suite`. Implement `name()` and `benchmarks()`. Add necessary `setup()` if the suite requires shared setup. Add group metadata via `additional_metadata()` if needed. 3. **Register Suite:** Import and add your new `Suite` instance to the `suites` list in `main.py`. -4. **Add to Presets:** If adding a new suite, add its `name()` to the relevant lists in `presets.py` (e.g., "Full", "Normal") so it runs with those presets. Update `README.md` and benchmarking workflow to include the new suite in presets' description/choices. +4. **Add to Presets:** If adding a new suite, add its `name()` to the relevant lists in `presets.py` (e.g., "Full", "Normal") so it runs with those presets. Update `README.md` and benchmarking workflow to include the new suite in presets' description/choices. Don't forget to create a new Suite object in `main.py`. ## Recommendations diff --git a/devops/scripts/benchmarks/README.md b/devops/scripts/benchmarks/README.md index d312da59b127a..9afd9f59a3d64 100644 --- a/devops/scripts/benchmarks/README.md +++ b/devops/scripts/benchmarks/README.md @@ -115,6 +115,7 @@ The available benchmarks options are: * `Full` (BenchDNN, Compute, Gromacs, llama, SYCL, Velocity and UMF benchmarks) * `SYCL` (Compute, llama, SYCL, Velocity) * `Minimal` (Compute) +* `Core` (Compute: SubmitKernel) * `Normal` (BenchDNN, Compute, Gromacs, llama, Velocity) * `Gromacs` (Gromacs) * `OneDNN` (BenchDNN) diff --git a/devops/scripts/benchmarks/benches/compute.py b/devops/scripts/benchmarks/benches/compute.py index f4ed34fec8553..9d8523dd1ad16 100644 --- a/devops/scripts/benchmarks/benches/compute.py +++ b/devops/scripts/benchmarks/benches/compute.py @@ -353,6 +353,41 @@ def createRrBench(variant_name: str, **kwargs): return benches +class ComputeBenchCoreSuite(ComputeBench): + """ + A suite for core compute benchmarks scenarios for quick runs. + """ + + def name(self) -> str: + return "Compute Benchmarks Core" + + def benchmarks(self) -> list[Benchmark]: + core_benches = [] + submit_kernel_params = product( + list(RUNTIMES), + [0, 1], # in_order_queue + [0, 1], # measure_completion + [0, 1], # use_events + ) + for ( + runtime, + in_order_queue, + measure_completion, + use_events, + ) in submit_kernel_params: + core_benches.append( + SubmitKernel( + self, + runtime, + in_order_queue, + measure_completion, + use_events, + KernelExecTime=1, + ) + ) + return core_benches + + class ComputeBenchmark(Benchmark): def __init__( self, diff --git a/devops/scripts/benchmarks/main.py b/devops/scripts/benchmarks/main.py index 7e234ef2d9e32..d908ef1015b90 100755 --- a/devops/scripts/benchmarks/main.py +++ b/devops/scripts/benchmarks/main.py @@ -269,6 +269,7 @@ def main(directory, additional_env_vars, compare_names, filter, execution_stats) suites = [ ComputeBench(), + ComputeBenchCoreSuite(), VelocityBench(), SyclBench(), LlamaCppBench(), diff --git a/devops/scripts/benchmarks/presets.py b/devops/scripts/benchmarks/presets.py index b1ee73227b351..55fe1f406bdc5 100644 --- a/devops/scripts/benchmarks/presets.py +++ b/devops/scripts/benchmarks/presets.py @@ -26,6 +26,9 @@ "Minimal": [ "Compute Benchmarks", ], + "Core": [ + "Compute Benchmarks Core", + ], "Normal": [ "BenchDNN", "Compute Benchmarks",