Skip to content

Commit

Permalink
Merge branch 'sycl' into review/yang/fix_msan_empty_kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZyne committed Dec 27, 2024
2 parents 6518987 + 232e62f commit 5a7d8fa
Show file tree
Hide file tree
Showing 25 changed files with 534 additions and 473 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/benchmarks-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,8 @@ jobs:
with:
path: ur-repo/benchmark_results.html
key: benchmark-results-${{ matrix.adapter.str_name }}-${{ github.run_id }}

- name: Get information about platform
if: ${{ always() }}
working-directory: ${{ github.workspace }}/ur-repo/
run: .github/scripts/get_system_info.sh
5 changes: 5 additions & 0 deletions .github/workflows/e2e_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ jobs:
id: tests
run: ninja -C build-e2e check-sycl-e2e || echo "e2e tests have failed. Ignoring failure."

- name: Get information about platform
if: ${{ always() }}
working-directory: ${{github.workspace}}/ur-repo
run: .github/scripts/get_system_info.sh

# FIXME: Requires pull-request: write permissions but this is only granted
# on pull requests from forks if using pull_request_target workflow
# trigger but not the pull_request trigger..
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ history to avoid pulling potentially breaking changes from the `main` branch.

## Third-Party tools

Tools can be acquired via instructions in [third_party](/third_party/README.md).
The recommended method to install the third-party tools is using a Python
virtual environment, for example:

```bash
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r third_party/requirements.txt
```

## Building

Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmarks/benches/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Result:
lower_is_better: bool = True
git_hash: str = ""
date: Optional[datetime] = None
suite: str = ""
suite: str = "Unknown"

@dataclass_json
@dataclass
Expand Down
192 changes: 192 additions & 0 deletions scripts/benchmarks/benchmark_results.html.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Benchmark Results</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 16px;
background: #f8f9fa;
}
.container {
max-width: 1100px;
margin: 0 auto;
}
h1, h2 {
color: #212529;
text-align: center;
margin-bottom: 24px;
font-weight: 500;
}
.chart {
background: white;
border-radius: 8px;
padding: 24px;
margin-bottom: 24px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
overflow-x: auto;
}
.chart > div {
min-width: 600px;
margin: 0 auto;
}
@media (max-width: 768px) {
body {
padding: 12px;
}
.chart {
padding: 16px;
border-radius: 6px;
}
h1 {
font-size: 24px;
margin-bottom: 16px;
}
}
.filter-container {
text-align: center;
margin-bottom: 24px;
}
.filter-container input {
padding: 8px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
width: 400px;
max-width: 100%;
}
.suite-filter-container {
text-align: center;
margin-bottom: 24px;
padding: 16px;
background: #e9ecef;
border-radius: 8px;
}
.suite-checkbox {
margin: 0 8px;
}
details {
margin-bottom: 24px;
}
summary {
font-size: 18px;
font-weight: 500;
cursor: pointer;
padding: 12px;
background: #e9ecef;
border-radius: 8px;
user-select: none;
}
summary:hover {
background: #dee2e6;
}
</style>
<script>
function getQueryParam(param) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(param);
}

function filterCharts() {
const regexInput = document.getElementById('bench-filter').value;
const regex = new RegExp(regexInput, 'i');
const activeSuites = Array.from(document.querySelectorAll('.suite-checkbox:checked')).map(checkbox => checkbox.getAttribute('data-suite'));
const charts = document.querySelectorAll('.chart');

charts.forEach(chart => {
const label = chart.getAttribute('data-label');
const suite = chart.getAttribute('data-suite');
if (regex.test(label) && activeSuites.includes(suite)) {
chart.style.display = '';
} else {
chart.style.display = 'none';
}
});

updateURL();
}

function updateURL() {
const url = new URL(window.location);
const regex = document.getElementById('bench-filter').value;
const activeSuites = Array.from(document.querySelectorAll('.suite-checkbox:checked')).map(checkbox => checkbox.getAttribute('data-suite'));

if (regex) {
url.searchParams.set('regex', regex);
} else {
url.searchParams.delete('regex');
}

if (activeSuites.length > 0) {
url.searchParams.set('suites', activeSuites.join(','));
} else {
url.searchParams.delete('suites');
}

history.replaceState(null, '', url);
}

document.addEventListener('DOMContentLoaded', (event) => {
const regexParam = getQueryParam('regex');
const suitesParam = getQueryParam('suites');

if (regexParam) {
document.getElementById('bench-filter').value = regexParam;
}

const suiteCheckboxes = document.querySelectorAll('.suite-checkbox');
if (suitesParam) {
const suites = suitesParam.split(',');
suiteCheckboxes.forEach(checkbox => {
if (suites.includes(checkbox.getAttribute('data-suite'))) {
checkbox.checked = true;
} else {
checkbox.checked = false;
}
});
} else {
suiteCheckboxes.forEach(checkbox => {
checkbox.checked = true;
});
}
filterCharts();

suiteCheckboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
filterCharts();
});
});

document.getElementById('bench-filter').addEventListener('input', () => {
filterCharts();
});
});
</script>
</head>
<body>
<div class="container">
<h1>Benchmark Results</h1>
<div class="filter-container">
<input type="text" id="bench-filter" placeholder="Regex...">
</div>
<div class="suite-filter-container">
${suite_checkboxes_html}
</div>
<details class="timeseries">
<summary>Historical Results</summary>
<div class="charts">
${timeseries_charts_html}
</div>
</details>
<details class="bar-charts">
<summary>Comparisons</summary>
<div class="charts">
${bar_charts_html}
</div>
</details>
</div>
</body>
</html>
Loading

0 comments on commit 5a7d8fa

Please sign in to comment.