Skip to content

Commit 1aa5944

Browse files
authored
[UR][Benchmarks] platform info added to bench results (#19640)
Benchmarks webpage displays platform information for selected runs --------- Signed-off-by: Mateusz P. Nowak <[email protected]>
1 parent a9efe10 commit 1aa5944

File tree

6 files changed

+447
-9
lines changed

6 files changed

+447
-9
lines changed

devops/scripts/benchmarks/history.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import socket
1010

1111
from utils.result import Result, BenchmarkRun
12+
from utils.platform import get_platform_info
1213
from options import Compare, options
1314
from datetime import datetime, timezone, timedelta
1415
from utils.utils import run
@@ -182,6 +183,9 @@ def git_info_from_path(path: Path) -> (str, str):
182183
else:
183184
compute_runtime = "unknown"
184185

186+
# Get platform information
187+
platform_info = get_platform_info()
188+
185189
return BenchmarkRun(
186190
name=name,
187191
git_hash=git_hash,
@@ -190,6 +194,7 @@ def git_info_from_path(path: Path) -> (str, str):
190194
results=results,
191195
hostname=hostname,
192196
compute_runtime=compute_runtime,
197+
platform=platform_info,
193198
)
194199

195200
def save(self, save_name, results: list[Result]):
@@ -246,6 +251,7 @@ def compute_average(self, data: list[BenchmarkRun]):
246251
git_hash="average",
247252
date=first_run.date, # should this be different?
248253
hostname=first_run.hostname,
254+
platform=first_run.platform,
249255
)
250256

251257
return average_benchmark_run

devops/scripts/benchmarks/html/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ <h3>Tags <button class="tag-action-button" onclick="toggleAllTags(false)">Clear
8787
<summary>Comparisons</summary>
8888
<div class="charts"></div>
8989
</details>
90+
<details class="platform-info">
91+
<summary>Platform Information</summary>
92+
<div class="platform"></div>
93+
</details>
9094
</div>
9195
</body>
9296
</html>

devops/scripts/benchmarks/html/scripts.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function updateSelectedRuns(forceUpdate = true) {
9292
activeRuns.forEach(name => {
9393
selectedRunsDiv.appendChild(createRunElement(name));
9494
});
95+
96+
// Update platform information for selected runs
97+
displaySelectedRunsPlatformInfo();
98+
9599
if (forceUpdate)
96100
updateCharts();
97101
}
@@ -1152,6 +1156,7 @@ function initializeCharts() {
11521156
setupSuiteFilters();
11531157
setupTagFilters();
11541158
setupToggles();
1159+
initializePlatformTab();
11551160

11561161
// Apply URL parameters
11571162
const regexParam = getQueryParam('regex');
@@ -1318,3 +1323,94 @@ function createAnnotationsOptions() {
13181323

13191324
return repoMap;
13201325
}
1326+
1327+
function displaySelectedRunsPlatformInfo() {
1328+
const container = document.querySelector('.platform-info .platform');
1329+
if (!container) return;
1330+
1331+
container.innerHTML = '';
1332+
1333+
// Get platform info for only the selected runs
1334+
const selectedRunsWithPlatform = Array.from(activeRuns)
1335+
.map(runName => {
1336+
const run = loadedBenchmarkRuns.find(r => r.name === runName);
1337+
if (run && run.platform) {
1338+
return { name: runName, platform: run.platform };
1339+
}
1340+
return null;
1341+
})
1342+
.filter(item => item !== null);
1343+
if (selectedRunsWithPlatform.length === 0) {
1344+
container.innerHTML = '<p>No platform information available to display.</p>';
1345+
return;
1346+
}
1347+
selectedRunsWithPlatform.forEach(runData => {
1348+
const runSection = document.createElement('div');
1349+
runSection.className = 'platform-run-section';
1350+
const runTitle = document.createElement('h3');
1351+
runTitle.textContent = `Run: ${runData.name}`;
1352+
runTitle.className = 'platform-run-title';
1353+
runSection.appendChild(runTitle);
1354+
// Create just the platform details without the grid wrapper
1355+
const platform = runData.platform;
1356+
const detailsContainer = document.createElement('div');
1357+
detailsContainer.className = 'platform-details-compact';
1358+
detailsContainer.innerHTML = createPlatformDetailsHTML(platform);
1359+
runSection.appendChild(detailsContainer);
1360+
container.appendChild(runSection);
1361+
});
1362+
}
1363+
1364+
// Platform Information Functions
1365+
1366+
function createPlatformDetailsHTML(platform) {
1367+
const formattedTimestamp = platform.timestamp ?
1368+
new Date(platform.timestamp).toLocaleString('en-US', {
1369+
year: 'numeric',
1370+
month: 'short',
1371+
day: 'numeric',
1372+
hour: '2-digit',
1373+
minute: '2-digit'
1374+
}) : 'Unknown';
1375+
1376+
return `
1377+
<div class="platform-section compact">
1378+
<div class="platform-item">
1379+
<span class="platform-label">Time:</span>
1380+
<span class="platform-value">${formattedTimestamp}</span>
1381+
</div>
1382+
<div class="platform-item">
1383+
<span class="platform-label">OS:</span>
1384+
<span class="platform-value">${platform.os || 'Unknown'}</span>
1385+
</div>
1386+
<div class="platform-item">
1387+
<span class="platform-label">CPU:</span>
1388+
<span class="platform-value">${platform.cpu_info || 'Unknown'} (${platform.cpu_count || '?'} cores)</span>
1389+
</div>
1390+
<div class="platform-item">
1391+
<span class="platform-label">GPU:</span>
1392+
<div class="platform-value multiple">
1393+
${platform.gpu_info && platform.gpu_info.length > 0
1394+
? platform.gpu_info.map(gpu => `<div class="platform-gpu-item"> • ${gpu}</div>`).join('')
1395+
: '<div class="platform-gpu-item"> • No GPU detected</div>'}
1396+
</div>
1397+
</div>
1398+
<div class="platform-item">
1399+
<span class="platform-label">Driver:</span>
1400+
<span class="platform-value">${platform.gpu_driver_version || 'Unknown'}</span>
1401+
</div>
1402+
<div class="platform-item">
1403+
<span class="platform-label">Tools:</span>
1404+
<span class="platform-value">${platform.gcc_version || '?'}${platform.clang_version || '?'}${platform.python || '?'}</span>
1405+
</div>
1406+
<div class="platform-item">
1407+
<span class="platform-label">Runtime:</span>
1408+
<span class="platform-value">${platform.level_zero_version || '?'} • compute-runtime ${platform.compute_runtime_version || '?'}</span>
1409+
</div>
1410+
</div>
1411+
`;
1412+
}
1413+
1414+
function initializePlatformTab() {
1415+
displaySelectedRunsPlatformInfo();
1416+
}

devops/scripts/benchmarks/html/styles.css

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ details[open] summary::after {
301301
gap: 4px;
302302
margin-bottom: 10px;
303303
}
304-
305304
.tag {
306305
display: inline-block;
307306
background-color: #e2e6ea;
@@ -311,27 +310,23 @@ details[open] summary::after {
311310
font-size: 12px;
312311
cursor: help;
313312
}
314-
315313
.tag-filter {
316314
display: inline-flex;
317315
align-items: center;
318316
margin: 4px;
319317
}
320-
321318
.tag-filter label {
322319
margin-left: 4px;
323320
cursor: pointer;
324321
display: flex;
325322
align-items: center;
326323
}
327-
328324
.tag-info {
329325
color: #0068B5;
330326
margin-left: 4px;
331327
cursor: help;
332328
font-size: 12px;
333329
}
334-
335330
#tag-filters {
336331
display: flex;
337332
flex-wrap: wrap;
@@ -342,7 +337,6 @@ details[open] summary::after {
342337
padding: 8px;
343338
background-color: #f8f9fa;
344339
}
345-
346340
.tag-action-button {
347341
padding: 2px 8px;
348342
background: #e2e6ea;
@@ -353,11 +347,9 @@ details[open] summary::after {
353347
margin-left: 8px;
354348
vertical-align: middle;
355349
}
356-
357350
.tag-action-button:hover {
358351
background: #ced4da;
359352
}
360-
361353
.remove-tag {
362354
background: none;
363355
border: none;
@@ -367,7 +359,84 @@ details[open] summary::after {
367359
font-size: 16px;
368360
padding: 0 4px;
369361
}
370-
371362
.remove-tag:hover {
372363
color: #f8d7da;
373364
}
365+
.platform {
366+
padding: 16px;
367+
background: white;
368+
border-radius: 8px;
369+
margin-top: 8px;
370+
}
371+
.platform-run-section {
372+
background: #f8f9fa;
373+
border: 1px solid #e9ecef;
374+
border-radius: 8px;
375+
padding: 20px;
376+
margin-bottom: 24px;
377+
}
378+
.platform-run-section:last-child {
379+
margin-bottom: 0;
380+
}
381+
.platform-run-title {
382+
color: #495057;
383+
font-size: 18px;
384+
margin: 0 0 16px 0;
385+
padding-bottom: 8px;
386+
border-bottom: 2px solid #dee2e6;
387+
font-weight: 600;
388+
}
389+
.platform-item {
390+
display: flex;
391+
align-items: flex-start;
392+
padding: 2px 0;
393+
margin-bottom: 4px;
394+
font-size: 13px;
395+
line-height: 1.3;
396+
}
397+
.platform-label {
398+
font-weight: 500;
399+
color: #495057;
400+
min-width: 80px;
401+
flex-shrink: 0;
402+
margin-right: 8px;
403+
font-size: 12px;
404+
}
405+
.platform-value {
406+
color: #212529;
407+
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
408+
font-size: 12px;
409+
line-height: 1.3;
410+
text-align: left;
411+
flex-grow: 1;
412+
}
413+
.platform-value.multiple {
414+
flex-direction: column;
415+
align-items: flex-start;
416+
}
417+
.platform-gpu-item {
418+
font-size: 11px;
419+
line-height: 1.2;
420+
margin: 1px 0;
421+
}
422+
.platform-details-compact {
423+
margin-top: 8px;
424+
}
425+
@media (max-width: 768px) {
426+
.platform-run-section {
427+
padding: 16px;
428+
margin-bottom: 16px;
429+
}
430+
.platform-run-title {
431+
font-size: 16px;
432+
margin-bottom: 12px;
433+
}
434+
.platform-item {
435+
flex-direction: column;
436+
align-items: flex-start;
437+
}
438+
.platform-value {
439+
margin-left: 0;
440+
margin-top: 4px;
441+
}
442+
}

0 commit comments

Comments
 (0)