Skip to content

Commit ccd3c15

Browse files
pbalcerianayl
authored andcommitted
[benchmarks] fix python formatting with black
1 parent cc9e26e commit ccd3c15

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

devops/scripts/benchmarks/main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
153153
SyclBench(directory),
154154
LlamaCppBench(directory),
155155
UMFSuite(directory),
156-
# TestSuite()
156+
TestSuite(),
157157
]
158158
if not options.dry_run
159159
else []
@@ -438,6 +438,13 @@ def validate_and_parse_env_args(env_args):
438438
help="Directory for cublas library",
439439
default=None,
440440
)
441+
parser.add_argument(
442+
"--preset",
443+
type=str,
444+
choices=[p.name for p in Presets],
445+
help="Benchmark preset to run.",
446+
default="FULL",
447+
)
441448

442449
args = parser.parse_args()
443450
additional_env_vars = validate_and_parse_env_args(args.env)

devops/scripts/benchmarks/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from enum import Enum
33

44

5+
56
class Compare(Enum):
67
LATEST = "latest"
78
AVERAGE = "average"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
3+
# See LICENSE.TXT
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
from enum import Enum
7+
8+
9+
class Preset:
10+
def description(self):
11+
pass
12+
13+
def suites(self) -> list[str]:
14+
return []
15+
16+
17+
class Full(Preset):
18+
def description(self):
19+
return "All available benchmarks."
20+
21+
def suites(self) -> list[str]:
22+
return [
23+
"Compute Benchmarks",
24+
"llama.cpp bench",
25+
"SYCL-Bench",
26+
"Velocity Bench",
27+
"UMF",
28+
]
29+
30+
31+
class SYCL(Preset):
32+
def description(self):
33+
return "All available benchmarks related to SYCL."
34+
35+
def suites(self) -> list[str]:
36+
return ["Compute Benchmarks", "llama.cpp bench", "SYCL-Bench", "Velocity Bench"]
37+
38+
39+
class Minimal(Preset):
40+
def description(self):
41+
return "Short microbenchmarks."
42+
43+
def suites(self) -> list[str]:
44+
return ["Compute Benchmarks"]
45+
46+
47+
class Normal(Preset):
48+
def description(self):
49+
return "Comprehensive mix of microbenchmarks and real applications."
50+
51+
def suites(self) -> list[str]:
52+
return ["Compute Benchmarks"]
53+
54+
55+
class Test(Preset):
56+
def description(self):
57+
return "Noop benchmarks for framework testing."
58+
59+
def suites(self) -> list[str]:
60+
return ["Test Suite"]
61+
62+
63+
class Presets(Enum):
64+
FULL = Full
65+
SYCL = SYCL # Nightly
66+
NORMAL = Normal # PR
67+
MINIMAL = Minimal # Quick smoke tests
68+
TEST = Test

0 commit comments

Comments
 (0)