Skip to content

Commit ffc60bf

Browse files
committed
support for tags in html
1 parent d2610c3 commit ffc60bf

File tree

7 files changed

+559
-299
lines changed

7 files changed

+559
-299
lines changed

devops/scripts/benchmarks/benches/base.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@
2424
BenchmarkTag('allocation', 'Benchmark tests memory allocation performance'),
2525
BenchmarkTag('graph', 'Benchmark tests graph performance'),]
2626

27-
def translate_tags(tag_names: list[str]) -> list[BenchmarkTag]:
28-
tags = []
29-
for tag_name in tag_names:
30-
for tag in benchmark_tags:
31-
if tag.name == tag_name:
32-
tags.append(tag)
33-
break
34-
35-
return tags
27+
benchmark_tags_dict = {tag.name: tag for tag in benchmark_tags}
3628

3729
class Benchmark:
3830
def __init__(self, directory, suite):
@@ -135,7 +127,7 @@ def get_metadata(self) -> BenchmarkMetadata:
135127
description=self.description(),
136128
notes=self.notes(),
137129
unstable=self.unstable(),
138-
tags=translate_tags(self.get_tags())
130+
tags=self.get_tags()
139131
)
140132

141133
class Suite:

devops/scripts/benchmarks/benches/compute.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import csv
88
import io
99
from utils.utils import run, git_clone, create_build_path
10-
from .base import Benchmark, Suite, translate_tags
10+
from .base import Benchmark, Suite
1111
from utils.result import BenchmarkMetadata, Result
1212
from options import options
1313
from enum import Enum
@@ -84,12 +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=translate_tags(['submit', 'micro'])
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=translate_tags(['submit', 'micro'])
92+
tags=['submit', 'micro', 'sycl', 'ur', 'L0']
93+
),
94+
"SubmitGraph": BenchmarkMetadata(
95+
type="group",
96+
tags=['submit', 'micro', 'sycl', 'ur', 'L0', 'graph']
9397
),
9498
}
9599

devops/scripts/benchmarks/html/index.html

Lines changed: 13 additions & 262 deletions
Original file line numberDiff line numberDiff line change
@@ -15,266 +15,7 @@
1515
<script src="data.js"></script>
1616
<script src="config.js"></script>
1717
<script src="scripts.js"></script>
18-
<style>
19-
body {
20-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
21-
margin: 0;
22-
padding: 16px;
23-
background: #f8f9fa;
24-
}
25-
.container {
26-
max-width: 1100px;
27-
margin: 0 auto;
28-
}
29-
h1, h2 {
30-
color: #212529;
31-
text-align: center;
32-
margin-bottom: 24px;
33-
font-weight: 500;
34-
}
35-
.chart-container {
36-
background: white;
37-
border-radius: 8px;
38-
padding: 24px;
39-
margin-bottom: 24px;
40-
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
41-
}
42-
@media (max-width: 768px) {
43-
body {
44-
padding: 12px;
45-
}
46-
.chart-container {
47-
padding: 16px;
48-
border-radius: 6px;
49-
}
50-
h1 {
51-
font-size: 24px;
52-
margin-bottom: 16px;
53-
}
54-
}
55-
.filter-container {
56-
text-align: center;
57-
margin-bottom: 24px;
58-
}
59-
.filter-container input {
60-
padding: 8px;
61-
font-size: 16px;
62-
border: 1px solid #ccc;
63-
border-radius: 4px;
64-
width: 400px;
65-
max-width: 100%;
66-
}
67-
.suite-filter-container {
68-
text-align: center;
69-
margin-bottom: 24px;
70-
padding: 16px;
71-
background: #e9ecef;
72-
border-radius: 8px;
73-
}
74-
.suite-checkbox {
75-
margin: 0 8px;
76-
}
77-
details {
78-
margin-bottom: 24px;
79-
}
80-
summary {
81-
display: flex;
82-
justify-content: space-between;
83-
align-items: center;
84-
font-size: 16px;
85-
font-weight: 500;
86-
cursor: pointer;
87-
padding: 8px;
88-
background: #e9ecef;
89-
border-radius: 8px;
90-
user-select: none;
91-
}
92-
summary:hover {
93-
background: #dee2e6;
94-
}
95-
.extra-info {
96-
padding: 8px;
97-
background: #f8f9fa;
98-
border-radius: 8px;
99-
margin-top: 8px;
100-
}
101-
.run-selector {
102-
text-align: center;
103-
margin-bottom: 24px;
104-
padding: 16px;
105-
background: #e9ecef;
106-
border-radius: 8px;
107-
}
108-
.run-selector select {
109-
width: 300px;
110-
padding: 8px;
111-
margin-right: 8px;
112-
}
113-
.run-selector button {
114-
padding: 8px 16px;
115-
background: #0068B5;
116-
color: white;
117-
border: none;
118-
border-radius: 4px;
119-
cursor: pointer;
120-
}
121-
.run-selector button:hover {
122-
background: #00C7FD;
123-
}
124-
.selected-runs {
125-
margin-top: 12px;
126-
}
127-
.selected-run {
128-
display: inline-block;
129-
padding: 4px 8px;
130-
margin: 4px;
131-
background: #e2e6ea;
132-
border-radius: 4px;
133-
}
134-
.selected-run button {
135-
margin-left: 8px;
136-
padding: 0 4px;
137-
background: none;
138-
border: none;
139-
color: #dc3545;
140-
cursor: pointer;
141-
}
142-
.download-button {
143-
background: none;
144-
border: none;
145-
color: #0068B5;
146-
cursor: pointer;
147-
font-size: 16px;
148-
padding: 4px;
149-
margin-left: 8px;
150-
}
151-
.download-button:hover {
152-
color: #00C7FD;
153-
}
154-
.loading-indicator {
155-
text-align: center;
156-
font-size: 18px;
157-
color: #0068B5;
158-
margin-bottom: 20px;
159-
}
160-
.extra-info-entry {
161-
border: 1px solid #ddd;
162-
padding: 10px;
163-
margin-bottom: 10px;
164-
background-color: #f9f9f9;
165-
border-radius: 5px;
166-
}
167-
.extra-info-entry strong {
168-
display: block;
169-
margin-bottom: 5px;
170-
}
171-
.extra-info-entry em {
172-
color: #555;
173-
}
174-
.display-options-container {
175-
text-align: center;
176-
margin-bottom: 24px;
177-
padding: 16px;
178-
background: #e9ecef;
179-
border-radius: 8px;
180-
}
181-
.display-options-container label {
182-
margin: 0 12px;
183-
cursor: pointer;
184-
}
185-
.display-options-container input {
186-
margin-right: 8px;
187-
}
188-
.benchmark-note {
189-
background-color: #cfe2ff;
190-
color: #084298;
191-
padding: 10px;
192-
margin-bottom: 10px;
193-
border-radius: 5px;
194-
border-left: 4px solid #084298;
195-
white-space: pre-line;
196-
}
197-
.benchmark-unstable {
198-
background-color: #f8d7da;
199-
color: #842029;
200-
padding: 10px;
201-
margin-bottom: 10px;
202-
border-radius: 5px;
203-
border-left: 4px solid #842029;
204-
white-space: pre-line;
205-
}
206-
.note-text {
207-
color: #084298;
208-
}
209-
.unstable-warning {
210-
color: #842029;
211-
font-weight: bold;
212-
}
213-
.unstable-text {
214-
color: #842029;
215-
}
216-
.options-container {
217-
margin-bottom: 24px;
218-
background: #e9ecef;
219-
border-radius: 8px;
220-
overflow: hidden;
221-
}
222-
.options-container summary {
223-
padding: 12px 16px;
224-
font-weight: 500;
225-
cursor: pointer;
226-
background: #dee2e6;
227-
user-select: none;
228-
}
229-
.options-container summary:hover {
230-
background: #ced4da;
231-
}
232-
.options-content {
233-
padding: 16px;
234-
display: flex;
235-
flex-wrap: wrap;
236-
gap: 24px;
237-
}
238-
.filter-section {
239-
flex: 1;
240-
min-width: 300px;
241-
}
242-
.filter-section h3 {
243-
margin-top: 0;
244-
margin-bottom: 12px;
245-
font-size: 18px;
246-
font-weight: 500;
247-
text-align: left;
248-
}
249-
#suite-filters {
250-
display: flex;
251-
flex-wrap: wrap;
252-
gap: 8px;
253-
}
254-
.display-options {
255-
display: flex;
256-
flex-direction: column;
257-
gap: 8px;
258-
}
259-
.display-options label {
260-
display: flex;
261-
align-items: center;
262-
cursor: pointer;
263-
}
264-
.display-options input {
265-
margin-right: 8px;
266-
}
267-
.benchmark-description {
268-
background-color: #f2f2f2;
269-
color: #333;
270-
padding: 10px;
271-
margin-bottom: 10px;
272-
border-radius: 5px;
273-
border-left: 4px solid #6c757d;
274-
white-space: pre-line;
275-
font-style: italic;
276-
}
277-
</style>
18+
<link rel="stylesheet" href="styles.css">
27819
</head>
27920
<body>
28021
<div class="container">
@@ -315,13 +56,23 @@ <h3>Display Options</h3>
31556
</label>
31657
</div>
31758
</div>
59+
60+
<div class="filter-section">
61+
<h3>Tags</h3>
62+
<div class="tag-filter-actions">
63+
<button onclick="toggleAllTags(false)">Clear All</button>
64+
</div>
65+
<div id="tag-filters">
66+
<!-- Tag checkboxes will be generated by JavaScript -->
67+
</div>
68+
</div>
31869
</div>
31970
</details>
320-
<details class="timeseries" open>
71+
<details class="timeseries">
32172
<summary>Historical Results</summary>
32273
<div class="charts"></div>
32374
</details>
324-
<details class="bar-charts" open>
75+
<details class="bar-charts">
32576
<summary>Comparisons</summary>
32677
<div class="charts"></div>
32778
</details>

0 commit comments

Comments
 (0)