Skip to content

Commit 2e00d9b

Browse files
committed
[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.
1 parent fbb1edb commit 2e00d9b

File tree

6 files changed

+42
-1
lines changed

6 files changed

+42
-1
lines changed

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- Full
2525
- SYCL
2626
- Minimal
27+
- Core
2728
- Normal
2829
- Test
2930
- Gromacs

devops/scripts/benchmarks/CONTRIB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Descriptions should:
209209
* 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.
210210
* 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.
211211
3. **Register Suite:** Import and add your new `Suite` instance to the `suites` list in `main.py`.
212-
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.
212+
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`.
213213

214214
## Recommendations
215215

devops/scripts/benchmarks/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ The available benchmarks options are:
115115
* `Full` (BenchDNN, Compute, Gromacs, llama, SYCL, Velocity and UMF benchmarks)
116116
* `SYCL` (Compute, llama, SYCL, Velocity)
117117
* `Minimal` (Compute)
118+
* `Core` (Compute: SubmitKernel)
118119
* `Normal` (BenchDNN, Compute, Gromacs, llama, Velocity)
119120
* `Gromacs` (Gromacs)
120121
* `OneDNN` (BenchDNN)

devops/scripts/benchmarks/benches/compute.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,41 @@ def createRrBench(variant_name: str, **kwargs):
353353
return benches
354354

355355

356+
class ComputeBenchCoreSuite(ComputeBench):
357+
"""
358+
A suite for core compute benchmarks scenarios for quick runs.
359+
"""
360+
361+
def name(self) -> str:
362+
return "Compute Benchmarks Core"
363+
364+
def benchmarks(self) -> list[Benchmark]:
365+
core_benches = []
366+
submit_kernel_params = product(
367+
list(RUNTIMES),
368+
[0, 1], # in_order_queue
369+
[0, 1], # measure_completion
370+
[0, 1], # use_events
371+
)
372+
for (
373+
runtime,
374+
in_order_queue,
375+
measure_completion,
376+
use_events,
377+
) in submit_kernel_params:
378+
core_benches.append(
379+
SubmitKernel(
380+
self,
381+
runtime,
382+
in_order_queue,
383+
measure_completion,
384+
use_events,
385+
KernelExecTime=1,
386+
)
387+
)
388+
return core_benches
389+
390+
356391
class ComputeBenchmark(Benchmark):
357392
def __init__(
358393
self,

devops/scripts/benchmarks/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ def main(directory, additional_env_vars, compare_names, filter, execution_stats)
269269

270270
suites = [
271271
ComputeBench(),
272+
ComputeBenchCoreSuite(),
272273
VelocityBench(),
273274
SyclBench(),
274275
LlamaCppBench(),

devops/scripts/benchmarks/presets.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"Minimal": [
2727
"Compute Benchmarks",
2828
],
29+
"Core": [
30+
"Compute Benchmarks Core",
31+
],
2932
"Normal": [
3033
"BenchDNN",
3134
"Compute Benchmarks",

0 commit comments

Comments
 (0)