Skip to content

Commit 75dd229

Browse files
committed
better and more tags
1 parent 3662b43 commit 75dd229

File tree

6 files changed

+75
-32
lines changed

6 files changed

+75
-32
lines changed

devops/scripts/benchmarks/benches/base.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,25 @@
1111
from options import options
1212
from utils.utils import download, run
1313

14-
benchmark_tags = [BenchmarkTag('sycl', 'Benchmark uses SYCL RT'),
15-
BenchmarkTag('ur', 'Benchmark uses Unified Runtime'),
16-
BenchmarkTag('L0', 'Benchmark uses L0 directly'),
17-
BenchmarkTag('umf', 'Benchmark uses UMF directly'),
18-
BenchmarkTag('micro', 'Microbenchmark focusing on a specific niche'),
19-
BenchmarkTag('application', 'Real application-based performance test'),
20-
BenchmarkTag('proxy', 'Benchmark that tries to implement a real application use-case'),
21-
BenchmarkTag('submit', 'Benchmark tests the kernel submit path'),
22-
BenchmarkTag('math', 'Benchmark tests math compute performance'),
23-
BenchmarkTag('memory', 'Benchmark tests memory transfer performance'),
24-
BenchmarkTag('allocation', 'Benchmark tests memory allocation performance'),
25-
BenchmarkTag('graph', 'Benchmark tests graph performance'),]
14+
benchmark_tags = [
15+
BenchmarkTag('SYCL', 'Benchmark uses SYCL runtime'),
16+
BenchmarkTag('UR', 'Benchmark uses Unified Runtime API'),
17+
BenchmarkTag('L0', 'Benchmark uses Level Zero API directly'),
18+
BenchmarkTag('UMF', 'Benchmark uses Unified Memory Framework directly'),
19+
BenchmarkTag('micro', 'Microbenchmark focusing on a specific functionality'),
20+
BenchmarkTag('application', 'Real application-based performance test'),
21+
BenchmarkTag('proxy', 'Benchmark that simulates real application use-cases'),
22+
BenchmarkTag('submit', 'Tests kernel submission performance'),
23+
BenchmarkTag('math', 'Tests math computation performance'),
24+
BenchmarkTag('memory', 'Tests memory transfer or bandwidth performance'),
25+
BenchmarkTag('allocation', 'Tests memory allocation performance'),
26+
BenchmarkTag('graph', 'Tests graph-based execution performance'),
27+
BenchmarkTag('latency', 'Measures operation latency'),
28+
BenchmarkTag('throughput', 'Measures operation throughput'),
29+
BenchmarkTag('inference', 'Tests ML/AI inference performance'),
30+
BenchmarkTag('image', 'Image processing benchmark'),
31+
BenchmarkTag('simulation', 'Physics or scientific simulation benchmark'),
32+
]
2633

2734
benchmark_tags_dict = {tag.name: tag for tag in benchmark_tags}
2835

devops/scripts/benchmarks/benches/compute.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def runtime_to_name(runtime: RUNTIMES) -> str:
2828

2929
def runtime_to_tag_name(runtime: RUNTIMES) -> str:
3030
return {
31-
RUNTIMES.SYCL: "sycl",
31+
RUNTIMES.SYCL: "SYCL",
3232
RUNTIMES.LEVEL_ZERO: "L0",
33-
RUNTIMES.UR: "ur",
33+
RUNTIMES.UR: "UR",
3434
}[runtime]
3535

3636

@@ -84,16 +84,16 @@ def additionalMetadata(self) -> dict[str, BenchmarkMetadata]:
8484
"The first layer is the Level Zero API, the second is the Unified Runtime API, and the third is the SYCL API.\n"
8585
"The UR v2 adapter noticeably reduces UR layer overhead, also improving SYCL performance.\n"
8686
"Work is ongoing to reduce the overhead of the SYCL API\n",
87-
tags=['submit', 'micro', 'sycl', 'ur', 'L0']
87+
tags=['submit', 'micro', 'SYCL', 'UR', 'L0']
8888
),
8989
"SinKernelGraph": BenchmarkMetadata(
9090
type="group",
9191
unstable="This benchmark combines both eager and graph execution, and may not be representative of real use cases.",
92-
tags=['submit', 'memory', 'proxy', 'sycl', 'ur', 'L0', 'graph']
92+
tags=['submit', 'memory', 'proxy', 'SYCL', 'UR', 'L0', 'graph']
9393
),
9494
"SubmitGraph": BenchmarkMetadata(
9595
type="group",
96-
tags=['submit', 'micro', 'sycl', 'ur', 'L0', 'graph']
96+
tags=['submit', 'micro', 'SYCL', 'UR', 'L0', 'graph']
9797
),
9898
}
9999

@@ -279,7 +279,7 @@ def __init__(self, bench, runtime: RUNTIMES, ioq, measure_completion=0):
279279
)
280280

281281
def get_tags(self):
282-
return ['submit', runtime_to_tag_name(self.runtime), 'micro']
282+
return ['submit', 'latency', runtime_to_tag_name(self.runtime), 'micro']
283283

284284
def name(self):
285285
order = "in order" if self.ioq else "out of order"
@@ -344,7 +344,7 @@ def description(self) -> str:
344344
)
345345

346346
def get_tags(self):
347-
return ['memory', 'sycl', 'micro']
347+
return ['memory', 'submit', 'latency', 'SYCL', 'micro']
348348

349349
def bin_args(self) -> list[str]:
350350
return [
@@ -377,7 +377,7 @@ def description(self) -> str:
377377
)
378378

379379
def get_tags(self):
380-
return ['memory', 'sycl', 'micro']
380+
return ['memory', 'latency', 'SYCL', 'micro']
381381

382382
def bin_args(self) -> list[str]:
383383
return [
@@ -407,7 +407,7 @@ def description(self) -> str:
407407
)
408408

409409
def get_tags(self):
410-
return ['memory', 'sycl', 'micro']
410+
return ['memory', 'latency', 'SYCL', 'micro']
411411

412412
def bin_args(self) -> list[str]:
413413
return [
@@ -439,7 +439,7 @@ def lower_is_better(self):
439439
return False
440440

441441
def get_tags(self):
442-
return ['memory', 'sycl', 'micro']
442+
return ['memory', 'throughput', 'SYCL', 'micro']
443443

444444
def bin_args(self) -> list[str]:
445445
return [
@@ -468,7 +468,7 @@ def description(self) -> str:
468468
)
469469

470470
def get_tags(self):
471-
return ['math', 'sycl', 'micro']
471+
return ['math', 'throughput', 'SYCL', 'micro']
472472

473473
def bin_args(self) -> list[str]:
474474
return [
@@ -517,7 +517,7 @@ def description(self) -> str:
517517
)
518518

519519
def get_tags(self):
520-
return ['memory', 'ur', 'micro']
520+
return ['memory', 'latency', 'UR', 'micro']
521521

522522
def bin_args(self) -> list[str]:
523523
return [
@@ -560,7 +560,7 @@ def unstable(self) -> str:
560560
return "This benchmark combines both eager and graph execution, and may not be representative of real use cases."
561561

562562
def get_tags(self):
563-
return ['graph', runtime_to_tag_name(self.runtime), 'proxy', 'submit', 'memory']
563+
return ['graph', runtime_to_tag_name(self.runtime), 'proxy', 'submit', 'memory', 'latency']
564564

565565
def bin_args(self) -> list[str]:
566566
return [
@@ -595,7 +595,7 @@ def name(self):
595595
return f"graph_api_benchmark_{self.runtime.value} SubmitGraph numKernels:{self.numKernels} ioq {self.inOrderQueue} measureCompletion {self.measureCompletionTime}"
596596

597597
def get_tags(self):
598-
return ['graph', runtime_to_tag_name(self.runtime), 'micro', 'submit']
598+
return ['graph', runtime_to_tag_name(self.runtime), 'micro', 'submit', 'latency']
599599

600600
def bin_args(self) -> list[str]:
601601
return [
@@ -625,7 +625,7 @@ def name(self):
625625
return f"ulls_benchmark_{self.runtime.value} EmptyKernel wgc:{self.wgc}, wgs:{self.wgs}"
626626

627627
def get_tags(self):
628-
return [runtime_to_tag_name(self.runtime), 'micro']
628+
return [runtime_to_tag_name(self.runtime), 'micro', 'latency', 'submit']
629629

630630
def bin_args(self) -> list[str]:
631631
return [
@@ -666,7 +666,7 @@ def name(self):
666666
return f"ulls_benchmark_{self.runtime.value} KernelSwitch count {self.count} kernelTime {self.kernelTime}"
667667

668668
def get_tags(self):
669-
return [runtime_to_tag_name(self.runtime), 'micro']
669+
return [runtime_to_tag_name(self.runtime), 'micro', 'latency', 'submit']
670670

671671
def bin_args(self) -> list[str]:
672672
return [

devops/scripts/benchmarks/benches/llamacpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def description(self) -> str:
102102
)
103103

104104
def get_tags(self):
105-
return ['sycl', 'application']
105+
return ['SYCL', 'application', 'inference', 'throughput']
106106

107107
def lower_is_better(self):
108108
return False

devops/scripts/benchmarks/benches/syclbench.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,16 @@ def extra_env_vars(self) -> dict:
113113
return {}
114114

115115
def get_tags(self):
116-
return ['sycl', 'micro']
116+
base_tags = ['SYCL', 'micro']
117+
if "Memory" in self.bench_name or "mem" in self.bench_name.lower():
118+
base_tags.append('memory')
119+
if "Reduction" in self.bench_name:
120+
base_tags.append('math')
121+
if "Bandwidth" in self.bench_name:
122+
base_tags.append('throughput')
123+
if "Latency" in self.bench_name:
124+
base_tags.append('latency')
125+
return base_tags
117126

118127
def setup(self):
119128
self.benchmark_bin = os.path.join(

devops/scripts/benchmarks/benches/umf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def setup(self):
7575
self.benchmark_bin = os.path.join(options.umf, "benchmark", self.bench_name)
7676

7777
def get_tags(self):
78-
return ['umf', 'allocation']
78+
return ['UMF', 'allocation', 'latency', 'micro']
7979

8080
def run(self, env_vars) -> list[Result]:
8181
command = [

devops/scripts/benchmarks/benches/velocity.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def description(self) -> str:
119119
return ""
120120

121121
def get_tags(self):
122-
return ['sycl', 'application']
122+
return ['SYCL', 'application']
123123

124124
def run(self, env_vars) -> list[Result]:
125125
env_vars.update(self.extra_env_vars())
@@ -175,6 +175,9 @@ def parse_output(self, stdout: str) -> float:
175175
"{self.__class__.__name__}: Failed to parse keys per second from benchmark output."
176176
)
177177

178+
def get_tags(self):
179+
return ['SYCL', 'application', 'throughput']
180+
178181

179182
class Bitcracker(VelocityBase):
180183
def __init__(self, vb: VelocityBench):
@@ -213,6 +216,9 @@ def parse_output(self, stdout: str) -> float:
213216
"{self.__class__.__name__}: Failed to parse benchmark output."
214217
)
215218

219+
def get_tags(self):
220+
return ['SYCL', 'application', 'throughput']
221+
216222

217223
class SobelFilter(VelocityBase):
218224
def __init__(self, vb: VelocityBench):
@@ -259,6 +265,9 @@ def parse_output(self, stdout: str) -> float:
259265
"{self.__class__.__name__}: Failed to parse benchmark output."
260266
)
261267

268+
def get_tags(self):
269+
return ['SYCL', 'application', 'image', 'throughput']
270+
262271

263272
class QuickSilver(VelocityBase):
264273
def __init__(self, vb: VelocityBench):
@@ -306,6 +315,9 @@ def parse_output(self, stdout: str) -> float:
306315
"{self.__class__.__name__}: Failed to parse benchmark output."
307316
)
308317

318+
def get_tags(self):
319+
return ['SYCL', 'application', 'simulation', 'throughput']
320+
309321

310322
class Easywave(VelocityBase):
311323
def __init__(self, vb: VelocityBench):
@@ -370,6 +382,9 @@ def parse_output(self, stdout: str) -> float:
370382
os.path.join(options.benchmark_cwd, "easywave.log")
371383
)
372384

385+
def get_tags(self):
386+
return ['SYCL', 'application', 'simulation']
387+
373388

374389
class CudaSift(VelocityBase):
375390
def __init__(self, vb: VelocityBench):
@@ -398,6 +413,9 @@ def parse_output(self, stdout: str) -> float:
398413
else:
399414
raise ValueError("Failed to parse benchmark output.")
400415

416+
def get_tags(self):
417+
return ['SYCL', 'application', 'image']
418+
401419

402420
class DLCifar(VelocityBase):
403421
def __init__(self, vb: VelocityBench):
@@ -449,6 +467,9 @@ def parse_output(self, stdout: str) -> float:
449467
else:
450468
raise ValueError("Failed to parse benchmark output.")
451469

470+
def get_tags(self):
471+
return ['SYCL', 'application', 'inference', 'image']
472+
452473

453474
class DLMnist(VelocityBase):
454475
def __init__(self, vb: VelocityBench):
@@ -534,6 +555,9 @@ def parse_output(self, stdout: str) -> float:
534555
else:
535556
raise ValueError("Failed to parse benchmark output.")
536557

558+
def get_tags(self):
559+
return ['SYCL', 'application', 'inference', 'image']
560+
537561

538562
class SVM(VelocityBase):
539563
def __init__(self, vb: VelocityBench):
@@ -576,3 +600,6 @@ def parse_output(self, stdout: str) -> float:
576600
return float(match.group(1))
577601
else:
578602
raise ValueError("Failed to parse benchmark output.")
603+
604+
def get_tags(self):
605+
return ['SYCL', 'application', 'inference']

0 commit comments

Comments
 (0)