Skip to content

Commit

Permalink
Merge branch 'main' into event-bool-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
winstonzhang-intel authored Dec 23, 2024
2 parents 0f1de75 + 232e62f commit bec59cc
Show file tree
Hide file tree
Showing 60 changed files with 906 additions and 555 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
3 changes: 3 additions & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9543,13 +9543,15 @@ urEnqueueCooperativeKernelLaunchExp(
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hKernel`
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
/// + `NULL == pLocalWorkSize`
/// + `NULL == pGroupCountRet`
/// - ::UR_RESULT_ERROR_INVALID_KERNEL
UR_APIEXPORT ur_result_t UR_APICALL
urKernelSuggestMaxCooperativeGroupCountExp(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
ur_device_handle_t hDevice, ///< [in] handle of the device object
uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the work-group
///< work-items
const size_t *pLocalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the
Expand Down Expand Up @@ -11090,6 +11092,7 @@ typedef struct ur_kernel_set_specialization_constants_params_t {
/// allowing the callback the ability to modify the parameter's value
typedef struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t {
ur_kernel_handle_t *phKernel;
ur_device_handle_t *phDevice;
uint32_t *pworkDim;
const size_t **ppLocalWorkSize;
size_t *pdynamicSharedMemorySize;
Expand Down
1 change: 1 addition & 0 deletions include/ur_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnGetKernelProcAddrTable_t)(
/// @brief Function-pointer for urKernelSuggestMaxCooperativeGroupCountExp
typedef ur_result_t(UR_APICALL *ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t)(
ur_kernel_handle_t,
ur_device_handle_t,
uint32_t,
const size_t *,
size_t,
Expand Down
6 changes: 6 additions & 0 deletions include/ur_print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13203,6 +13203,12 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
ur::details::printPtr(os,
*(params->phKernel));

os << ", ";
os << ".hDevice = ";

ur::details::printPtr(os,
*(params->phDevice));

os << ", ";
os << ".workDim = ";

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 bec59cc

Please sign in to comment.