Skip to content

Commit 8368b99

Browse files
authored
Merge branch 'main' into yc/1218-libcxx-mess
2 parents 0e5fbce + ba13487 commit 8368b99

File tree

69 files changed

+1068
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1068
-651
lines changed

.github/workflows/benchmarks-reusable.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,8 @@ jobs:
236236
with:
237237
path: ur-repo/benchmark_results.html
238238
key: benchmark-results-${{ matrix.adapter.str_name }}-${{ github.run_id }}
239+
240+
- name: Get information about platform
241+
if: ${{ always() }}
242+
working-directory: ${{ github.workspace }}/ur-repo/
243+
run: .github/scripts/get_system_info.sh

.github/workflows/e2e_core.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ jobs:
192192
id: tests
193193
run: ninja -C build-e2e check-sycl-e2e || echo "e2e tests have failed. Ignoring failure."
194194

195+
- name: Get information about platform
196+
if: ${{ always() }}
197+
working-directory: ${{github.workspace}}/ur-repo
198+
run: .github/scripts/get_system_info.sh
199+
195200
# FIXME: Requires pull-request: write permissions but this is only granted
196201
# on pull requests from forks if using pull_request_target workflow
197202
# trigger but not the pull_request trigger..

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ history to avoid pulling potentially breaking changes from the `main` branch.
7676

7777
## Third-Party tools
7878

79-
Tools can be acquired via instructions in [third_party](/third_party/README.md).
79+
The recommended method to install the third-party tools is using a Python
80+
virtual environment, for example:
81+
82+
```bash
83+
$ python -m venv .venv
84+
$ source .venv/bin/activate
85+
$ pip install -r third_party/requirements.txt
86+
```
8087

8188
## Building
8289

include/ur_api.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9543,13 +9543,15 @@ urEnqueueCooperativeKernelLaunchExp(
95439543
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
95449544
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
95459545
/// + `NULL == hKernel`
9546+
/// + `NULL == hDevice`
95469547
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
95479548
/// + `NULL == pLocalWorkSize`
95489549
/// + `NULL == pGroupCountRet`
95499550
/// - ::UR_RESULT_ERROR_INVALID_KERNEL
95509551
UR_APIEXPORT ur_result_t UR_APICALL
95519552
urKernelSuggestMaxCooperativeGroupCountExp(
95529553
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
9554+
ur_device_handle_t hDevice, ///< [in] handle of the device object
95539555
uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the work-group
95549556
///< work-items
95559557
const size_t *pLocalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the
@@ -11090,6 +11092,7 @@ typedef struct ur_kernel_set_specialization_constants_params_t {
1109011092
/// allowing the callback the ability to modify the parameter's value
1109111093
typedef struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t {
1109211094
ur_kernel_handle_t *phKernel;
11095+
ur_device_handle_t *phDevice;
1109311096
uint32_t *pworkDim;
1109411097
const size_t **ppLocalWorkSize;
1109511098
size_t *pdynamicSharedMemorySize;

include/ur_ddi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnGetKernelProcAddrTable_t)(
651651
/// @brief Function-pointer for urKernelSuggestMaxCooperativeGroupCountExp
652652
typedef ur_result_t(UR_APICALL *ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t)(
653653
ur_kernel_handle_t,
654+
ur_device_handle_t,
654655
uint32_t,
655656
const size_t *,
656657
size_t,

include/ur_print.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13203,6 +13203,12 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
1320313203
ur::details::printPtr(os,
1320413204
*(params->phKernel));
1320513205

13206+
os << ", ";
13207+
os << ".hDevice = ";
13208+
13209+
ur::details::printPtr(os,
13210+
*(params->phDevice));
13211+
1320613212
os << ", ";
1320713213
os << ".workDim = ";
1320813214

scripts/benchmarks/benches/result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Result:
2727
lower_is_better: bool = True
2828
git_hash: str = ""
2929
date: Optional[datetime] = None
30-
suite: str = ""
30+
suite: str = "Unknown"
3131

3232
@dataclass_json
3333
@dataclass
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Benchmark Results</title>
7+
<style>
8+
body {
9+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
10+
margin: 0;
11+
padding: 16px;
12+
background: #f8f9fa;
13+
}
14+
.container {
15+
max-width: 1100px;
16+
margin: 0 auto;
17+
}
18+
h1, h2 {
19+
color: #212529;
20+
text-align: center;
21+
margin-bottom: 24px;
22+
font-weight: 500;
23+
}
24+
.chart {
25+
background: white;
26+
border-radius: 8px;
27+
padding: 24px;
28+
margin-bottom: 24px;
29+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
30+
overflow-x: auto;
31+
}
32+
.chart > div {
33+
min-width: 600px;
34+
margin: 0 auto;
35+
}
36+
@media (max-width: 768px) {
37+
body {
38+
padding: 12px;
39+
}
40+
.chart {
41+
padding: 16px;
42+
border-radius: 6px;
43+
}
44+
h1 {
45+
font-size: 24px;
46+
margin-bottom: 16px;
47+
}
48+
}
49+
.filter-container {
50+
text-align: center;
51+
margin-bottom: 24px;
52+
}
53+
.filter-container input {
54+
padding: 8px;
55+
font-size: 16px;
56+
border: 1px solid #ccc;
57+
border-radius: 4px;
58+
width: 400px;
59+
max-width: 100%;
60+
}
61+
.suite-filter-container {
62+
text-align: center;
63+
margin-bottom: 24px;
64+
padding: 16px;
65+
background: #e9ecef;
66+
border-radius: 8px;
67+
}
68+
.suite-checkbox {
69+
margin: 0 8px;
70+
}
71+
details {
72+
margin-bottom: 24px;
73+
}
74+
summary {
75+
font-size: 18px;
76+
font-weight: 500;
77+
cursor: pointer;
78+
padding: 12px;
79+
background: #e9ecef;
80+
border-radius: 8px;
81+
user-select: none;
82+
}
83+
summary:hover {
84+
background: #dee2e6;
85+
}
86+
</style>
87+
<script>
88+
function getQueryParam(param) {
89+
const urlParams = new URLSearchParams(window.location.search);
90+
return urlParams.get(param);
91+
}
92+
93+
function filterCharts() {
94+
const regexInput = document.getElementById('bench-filter').value;
95+
const regex = new RegExp(regexInput, 'i');
96+
const activeSuites = Array.from(document.querySelectorAll('.suite-checkbox:checked')).map(checkbox => checkbox.getAttribute('data-suite'));
97+
const charts = document.querySelectorAll('.chart');
98+
99+
charts.forEach(chart => {
100+
const label = chart.getAttribute('data-label');
101+
const suite = chart.getAttribute('data-suite');
102+
if (regex.test(label) && activeSuites.includes(suite)) {
103+
chart.style.display = '';
104+
} else {
105+
chart.style.display = 'none';
106+
}
107+
});
108+
109+
updateURL();
110+
}
111+
112+
function updateURL() {
113+
const url = new URL(window.location);
114+
const regex = document.getElementById('bench-filter').value;
115+
const activeSuites = Array.from(document.querySelectorAll('.suite-checkbox:checked')).map(checkbox => checkbox.getAttribute('data-suite'));
116+
117+
if (regex) {
118+
url.searchParams.set('regex', regex);
119+
} else {
120+
url.searchParams.delete('regex');
121+
}
122+
123+
if (activeSuites.length > 0) {
124+
url.searchParams.set('suites', activeSuites.join(','));
125+
} else {
126+
url.searchParams.delete('suites');
127+
}
128+
129+
history.replaceState(null, '', url);
130+
}
131+
132+
document.addEventListener('DOMContentLoaded', (event) => {
133+
const regexParam = getQueryParam('regex');
134+
const suitesParam = getQueryParam('suites');
135+
136+
if (regexParam) {
137+
document.getElementById('bench-filter').value = regexParam;
138+
}
139+
140+
const suiteCheckboxes = document.querySelectorAll('.suite-checkbox');
141+
if (suitesParam) {
142+
const suites = suitesParam.split(',');
143+
suiteCheckboxes.forEach(checkbox => {
144+
if (suites.includes(checkbox.getAttribute('data-suite'))) {
145+
checkbox.checked = true;
146+
} else {
147+
checkbox.checked = false;
148+
}
149+
});
150+
} else {
151+
suiteCheckboxes.forEach(checkbox => {
152+
checkbox.checked = true;
153+
});
154+
}
155+
filterCharts();
156+
157+
suiteCheckboxes.forEach(checkbox => {
158+
checkbox.addEventListener('change', () => {
159+
filterCharts();
160+
});
161+
});
162+
163+
document.getElementById('bench-filter').addEventListener('input', () => {
164+
filterCharts();
165+
});
166+
});
167+
</script>
168+
</head>
169+
<body>
170+
<div class="container">
171+
<h1>Benchmark Results</h1>
172+
<div class="filter-container">
173+
<input type="text" id="bench-filter" placeholder="Regex...">
174+
</div>
175+
<div class="suite-filter-container">
176+
${suite_checkboxes_html}
177+
</div>
178+
<details class="timeseries">
179+
<summary>Historical Results</summary>
180+
<div class="charts">
181+
${timeseries_charts_html}
182+
</div>
183+
</details>
184+
<details class="bar-charts">
185+
<summary>Comparisons</summary>
186+
<div class="charts">
187+
${bar_charts_html}
188+
</div>
189+
</details>
190+
</div>
191+
</body>
192+
</html>

0 commit comments

Comments
 (0)