Skip to content

Commit 0e6a7d3

Browse files
committed
Merge remote-tracking branch 'origin/main' into yc-PR/1028-leak-check-option
2 parents 8309920 + 2eae687 commit 0e6a7d3

File tree

194 files changed

+4924
-2263
lines changed

Some content is hidden

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

194 files changed

+4924
-2263
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Compute Benchmarks Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs at midnight UTC every day
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
nightly:
13+
name: Compute Benchmarks Nightly level-zero
14+
uses: ./.github/workflows/benchmarks-reusable.yml
15+
with:
16+
str_name: 'level_zero'
17+
unit: 'gpu'
18+
pr_no: 0
19+
bench_script_params: '--save baseline'
20+
sycl_config_params: ''
21+
sycl_repo: 'intel/llvm'
22+
sycl_commit: ''
23+
24+
nightly2:
25+
# we need to wait until previous job is done so that the html report
26+
# contains both runs
27+
needs: nightly
28+
name: Compute Benchmarks Nightly level-zero v2
29+
uses: ./.github/workflows/benchmarks-reusable.yml
30+
with:
31+
str_name: 'level_zero_v2'
32+
unit: 'gpu'
33+
pr_no: 0
34+
bench_script_params: '--save baseline-v2'
35+
sycl_config_params: ''
36+
sycl_repo: 'intel/llvm'
37+
sycl_commit: ''
38+
upload_report: true

.github/workflows/benchmarks_compute.yml renamed to .github/workflows/benchmarks-reusable.yml

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,39 @@
1-
name: Compute Benchmarks
1+
name: Benchmarks Reusable
22

33
on:
4-
# Can be triggered via manual "dispatch" (from workflow view in GitHub Actions tab)
5-
workflow_dispatch:
6-
# acceptable input for adapter-specific runs
4+
workflow_call:
75
inputs:
86
str_name:
9-
description: Formatted adapter name
10-
type: choice
117
required: true
12-
default: 'level_zero'
13-
options:
14-
- level_zero
15-
- level_zero_v2
8+
type: string
169
unit:
17-
description: Test unit (cpu/gpu)
18-
type: choice
1910
required: true
20-
default: 'gpu'
21-
options:
22-
- cpu
23-
- gpu
11+
type: string
2412
pr_no:
25-
description: PR number (if 0, it'll run on the main)
26-
type: number
2713
required: true
28-
bench_script_params:
29-
description: Parameters passed to script executing benchmark
14+
# even though this is a number, this is a workaround for issues with
15+
# reusable workflow calls that result in "Unexpected value '0'" error.
3016
type: string
17+
bench_script_params:
3118
required: false
19+
type: string
3220
default: ''
3321
sycl_config_params:
34-
description: Extra params for SYCL configuration
35-
type: string
3622
required: false
23+
type: string
3724
default: ''
3825
sycl_repo:
39-
description: 'Compiler repo'
40-
type: string
4126
required: true
27+
type: string
4228
default: 'intel/llvm'
4329
sycl_commit:
44-
description: 'Compiler commit'
45-
type: string
4630
required: false
31+
type: string
4732
default: ''
33+
upload_report:
34+
required: false
35+
type: boolean
36+
default: false
4837

4938
permissions:
5039
contents: read
@@ -56,19 +45,17 @@ jobs:
5645
strategy:
5746
matrix:
5847
adapter: [
59-
{str_name: "${{inputs.str_name}}",
60-
sycl_config: "${{inputs.sycl_config_params}}",
61-
unit: "${{inputs.unit}}"
48+
{str_name: "${{ inputs.str_name }}",
49+
sycl_config: "${{ inputs.sycl_config_params }}",
50+
unit: "${{ inputs.unit }}"
6251
}
6352
]
6453
build_type: [Release]
6554
compiler: [{c: clang, cxx: clang++}]
6655

67-
runs-on: "${{inputs.str_name}}_PERF"
56+
runs-on: "${{ inputs.str_name }}_PERF"
6857

6958
steps:
70-
# Workspace on self-hosted runners is not cleaned automatically.
71-
# We have to delete the files created outside of using actions.
7259
- name: Cleanup self-hosted workspace
7360
if: always()
7461
run: |
@@ -99,7 +86,8 @@ jobs:
9986
path: ur-repo
10087

10188
- name: Install pip packages
102-
run: pip install -r ${{github.workspace}}/ur-repo/third_party/requirements.txt
89+
run: |
90+
pip install --force-reinstall -r ${{github.workspace}}/ur-repo/third_party/benchmark_requirements.txt
10391
10492
# We need to fetch special ref for proper PR's merge commit. Note, this ref may be absent if the PR is already merged.
10593
- name: Fetch PR's merge commit
@@ -169,13 +157,15 @@ jobs:
169157
run: cmake --install ${{github.workspace}}/ur_build
170158

171159
- name: Run benchmarks
160+
working-directory: ${{ github.workspace }}/ur-repo/
172161
id: benchmarks
173162
run: >
174-
numactl -N 0 ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
175-
~/bench_workdir
176-
${{github.workspace}}/sycl_build
177-
${{github.workspace}}/ur_install
178-
${{ matrix.adapter.str_name }}
163+
numactl -N 0 ${{ github.workspace }}/ur-repo/scripts/benchmarks/main.py
164+
~/bench_workdir
165+
--sycl ${{ github.workspace }}/sycl_build
166+
--ur ${{ github.workspace }}/ur_install
167+
--adapter ${{ matrix.adapter.str_name }}
168+
${{ inputs.upload_report && '--output-html' || '' }}
179169
${{ inputs.bench_script_params }}
180170
181171
- name: Add comment to PR
@@ -186,7 +176,7 @@ jobs:
186176
let markdown = ""
187177
try {
188178
const fs = require('fs');
189-
markdown = fs.readFileSync('benchmark_results.md', 'utf8');
179+
markdown = fs.readFileSync('ur-repo/benchmark_results.md', 'utf8');
190180
} catch(err) {
191181
}
192182
@@ -204,3 +194,10 @@ jobs:
204194
repo: context.repo.repo,
205195
body: body
206196
})
197+
198+
- name: Upload HTML report
199+
if: ${{ always() && inputs.upload_report }}
200+
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
201+
with:
202+
path: ur-repo/benchmark_results.html
203+
key: benchmark-results-${{ matrix.adapter.str_name }}-${{ github.run_id }}

.github/workflows/benchmarks.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Compute Benchmarks
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
str_name:
7+
description: Formatted adapter name
8+
type: choice
9+
required: true
10+
default: 'level_zero'
11+
options:
12+
- level_zero
13+
- level_zero_v2
14+
unit:
15+
description: Test unit (cpu/gpu)
16+
type: choice
17+
required: true
18+
default: 'gpu'
19+
options:
20+
- cpu
21+
- gpu
22+
pr_no:
23+
description: PR number (if 0, it'll run on the main)
24+
type: number
25+
required: true
26+
bench_script_params:
27+
description: Parameters passed to script executing benchmark
28+
type: string
29+
required: false
30+
default: ''
31+
sycl_config_params:
32+
description: Extra params for SYCL configuration
33+
type: string
34+
required: false
35+
default: ''
36+
sycl_repo:
37+
description: 'Compiler repo'
38+
type: string
39+
required: true
40+
default: 'intel/llvm'
41+
sycl_commit:
42+
description: 'Compiler commit'
43+
type: string
44+
required: false
45+
default: ''
46+
upload_report:
47+
description: 'Upload HTML report'
48+
type: boolean
49+
required: false
50+
default: false
51+
52+
permissions:
53+
contents: read
54+
pull-requests: write
55+
56+
jobs:
57+
manual:
58+
name: Compute Benchmarks
59+
uses: ./.github/workflows/benchmarks-reusable.yml
60+
with:
61+
str_name: ${{ inputs.str_name }}
62+
unit: ${{ inputs.unit }}
63+
pr_no: ${{ inputs.pr_no }}
64+
bench_script_params: ${{ inputs.bench_script_params }}
65+
sycl_config_params: ${{ inputs.sycl_config_params }}
66+
sycl_repo: ${{ inputs.sycl_repo }}
67+
sycl_commit: ${{ inputs.sycl_commit }}
68+
upload_report: ${{ inputs.upload_report }}

.github/workflows/build-hw-reusable.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ on:
77
adapter_name:
88
required: true
99
type: string
10+
other_adapter_name:
11+
required: false
12+
type: string
13+
default: ""
1014
runner_name:
1115
required: true
1216
type: string
1317
platform:
18+
description: "Platform string, `UR_CTS_ADAPTER_PLATFORM` will be set to this."
1419
required: false
1520
type: string
1621
default: ""
@@ -39,9 +44,13 @@ jobs:
3944
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
4045
strategy:
4146
matrix:
42-
adapter: [
43-
{name: "${{inputs.adapter_name}}", platform: "${{inputs.platform}}", static_Loader: "${{inputs.static_loader}}", static_adapter: "${{inputs.static_loader}}"},
44-
]
47+
adapter: [{
48+
name: "${{inputs.adapter_name}}",
49+
other_name: "${{inputs.other_adapter_name}}",
50+
platform: "${{inputs.platform}}",
51+
static_Loader: "${{inputs.static_loader}}",
52+
static_adapter: "${{inputs.static_loader}}"
53+
}]
4554
build_type: [Debug, Release]
4655
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
4756
# TODO: The latest L0 loader segfaults when built with clang.
@@ -82,8 +91,9 @@ jobs:
8291
-DUR_ENABLE_TRACING=ON
8392
-DUR_DEVELOPER_MODE=ON
8493
-DUR_BUILD_TESTS=ON
85-
-DUR_CONFORMANCE_TEST_LOADER=OFF
8694
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
95+
-DUR_CONFORMANCE_TEST_LOADER=${{ matrix.adapter.other_name != '' && 'ON' || 'OFF' }}
96+
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
8797
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
8898
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
8999
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
@@ -103,6 +113,8 @@ jobs:
103113
- name: Test adapter specific
104114
working-directory: ${{github.workspace}}/build
105115
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180
116+
# Don't run adapter specific tests when building multiple adapters
117+
if: ${{ matrix.adapter.other_name == '' }}
106118

107119
- name: Test adapters
108120
working-directory: ${{github.workspace}}/build

.github/workflows/cmake.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,24 @@ jobs:
187187
adapter_name: NATIVE_CPU
188188
runner_name: NATIVE_CPU
189189

190+
# Native CPU jobs are here to force the loader to be used (UR will not use the loader if there is only one target)
191+
combined-opencl-native-cpu:
192+
name: OpenCL + Native CPU (Loader)
193+
uses: ./.github/workflows/build-hw-reusable.yml
194+
with:
195+
adapter_name: OPENCL
196+
other_adapter_name: NATIVE_CPU
197+
runner_name: OPENCL
198+
platform: "OPENCL:Intel(R) OpenCL"
199+
200+
combined-level-zero-native-cpu:
201+
name: Level Zero + Native CPU (Loader)
202+
uses: ./.github/workflows/build-hw-reusable.yml
203+
with:
204+
adapter_name: L0
205+
other_adapter_name: NATIVE_CPU
206+
runner_name: L0
207+
190208
e2e-level-zero:
191209
name: E2E L0
192210
permissions:

.github/workflows/docs.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,23 @@ jobs:
4545

4646
- name: Build Documentation
4747
working-directory: ${{github.workspace}}/scripts
48-
run: python3 run.py --core
48+
run: |
49+
python3 run.py --core
50+
mkdir -p ${{ github.workspace }}/ur-repo/
51+
mkdir -p ${{github.workspace}}/docs/html
52+
53+
- name: Download benchmark HTML
54+
id: download-bench-html
55+
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
56+
with:
57+
path: ur-repo/benchmark_results.html
58+
key: benchmark-results-
59+
60+
- name: Move benchmark HTML
61+
# exact or partial cache hit
62+
if: steps.download-bench-html.outputs.cache-hit != ''
63+
run: |
64+
mv ${{ github.workspace }}/ur-repo/benchmark_results.html ${{ github.workspace }}/docs/html/
4965
5066
- name: Upload artifact
5167
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0

.github/workflows/multi_device.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ jobs:
6363

6464
- name: Test adapters
6565
working-directory: ${{github.workspace}}/build
66-
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "enqueue|kernel|integration|exp_command_buffer|exp_enqueue_native|exp_launch_properties|exp_usm_p2p" --timeout 180
66+
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "exp_command_buffer" --timeout 180

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if(UR_ENABLE_TRACING)
137137

138138
if (UR_BUILD_XPTI_LIBS)
139139
# fetch xpti proxy library for the tracing layer
140-
FetchContentSparse_Declare(xpti https://github.com/intel/llvm.git "sycl-nightly/20230703" "xpti")
140+
FetchContentSparse_Declare(xpti https://github.com/intel/llvm.git "nightly-2024-10-22" "xpti")
141141
FetchContent_MakeAvailable(xpti)
142142

143143
# set -fPIC for xpti since we are linking it with a shared library
@@ -149,7 +149,7 @@ if(UR_ENABLE_TRACING)
149149
set(XPTI_DIR ${xpti_SOURCE_DIR})
150150
set(XPTI_ENABLE_TESTS OFF CACHE INTERNAL "Turn off xptifw tests")
151151

152-
FetchContentSparse_Declare(xptifw https://github.com/intel/llvm.git "sycl-nightly/20230703" "xptifw")
152+
FetchContentSparse_Declare(xptifw https://github.com/intel/llvm.git "nightly-2024-10-22" "xptifw")
153153

154154
FetchContent_MakeAvailable(xptifw)
155155

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/unified-runtime/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/unified-runtime)
99
[![Trivy](https://github.com/oneapi-src/unified-runtime/actions/workflows/trivy.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/trivy.yml)
1010
[![Deploy documentation to Pages](https://github.com/oneapi-src/unified-runtime/actions/workflows/docs.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/docs.yml)
11+
[![Compute Benchmarks Nightly](https://github.com/oneapi-src/unified-runtime/actions/workflows/benchmarks-nightly.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/benchmarks-nightly.yml)
1112

1213
<!-- TODO: add general description and purpose of the project -->
1314

cmake/FetchLevelZero.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (NOT DEFINED LEVEL_ZERO_LIBRARY OR NOT DEFINED LEVEL_ZERO_INCLUDE_DIR)
4040
set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git")
4141
endif()
4242
if (UR_LEVEL_ZERO_LOADER_TAG STREQUAL "")
43-
set(UR_LEVEL_ZERO_LOADER_TAG v1.17.39)
43+
set(UR_LEVEL_ZERO_LOADER_TAG v1.18.5)
4444
endif()
4545

4646
# Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104

0 commit comments

Comments
 (0)