Skip to content

Commit b02525f

Browse files
committed
Merge branch 'sycl' into use-device-usm-for-rtl-data
2 parents e84c882 + ed9145d commit b02525f

File tree

273 files changed

+8813
-4838
lines changed

Some content is hidden

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

273 files changed

+8813
-4838
lines changed

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ loader:
3131
opencl:
3232
- changed-files:
3333
- any-glob-to-any-file:
34-
- source/adapter/opencl/**
34+
- source/adapters/opencl/**
3535

3636
level-zero:
3737
- changed-files:

.github/scripts/0001-travis-fix-travisci_build_coverity_scan.sh.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.
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-fuzz-reusable.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ jobs:
4141
4242
- name: Build level zero with gcc
4343
run: |
44-
git clone -b v1.17.6 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
44+
git clone -b v1.18.5 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero
4545
cd ${{github.workspace}}/level-zero
4646
cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
4747
cmake --build build -j $(nproc)
4848
4949
- name: Configure CMake
50+
# CFI sanitization (or flto?) seems to cause linking to fail
51+
# https://github.com/oneapi-src/unified-runtime/issues/2323
5052
run: >
5153
cmake
5254
-B${{github.workspace}}/build
@@ -58,6 +60,7 @@ jobs:
5860
-DUR_USE_ASAN=ON
5961
-DUR_USE_UBSAN=ON
6062
-DUR_BUILD_ADAPTER_L0=ON
63+
-DUR_USE_CFI=OFF
6164
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
6265
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
6366
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++

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

Lines changed: 19 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.
@@ -73,6 +82,8 @@ jobs:
7382
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
7483
7584
- name: Configure CMake
85+
# CFI sanitization seems to fail on our CUDA nodes
86+
# https://github.com/oneapi-src/unified-runtime/issues/2309
7687
run: >
7788
cmake
7889
-B${{github.workspace}}/build
@@ -82,8 +93,10 @@ jobs:
8293
-DUR_ENABLE_TRACING=ON
8394
-DUR_DEVELOPER_MODE=ON
8495
-DUR_BUILD_TESTS=ON
85-
-DUR_CONFORMANCE_TEST_LOADER=OFF
8696
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
97+
-DUR_CONFORMANCE_TEST_LOADER=${{ matrix.adapter.other_name != '' && 'ON' || 'OFF' }}
98+
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
99+
-DUR_USE_CFI=${{ matrix.adapter.name == 'CUDA' && 'OFF' || 'ON' }}
87100
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
88101
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
89102
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
@@ -103,6 +116,8 @@ jobs:
103116
- name: Test adapter specific
104117
working-directory: ${{github.workspace}}/build
105118
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180
119+
# Don't run adapter specific tests when building multiple adapters
120+
if: ${{ matrix.adapter.other_name == '' }}
106121

107122
- name: Test adapters
108123
working-directory: ${{github.workspace}}/build

0 commit comments

Comments
 (0)