Skip to content

Commit e5baa6f

Browse files
Merge branch 'main' into steffen/composite_devices_not_supported_and_empty
2 parents 33410b5 + ab94782 commit e5baa6f

File tree

113 files changed

+4131
-823
lines changed

Some content is hidden

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

113 files changed

+4131
-823
lines changed

.github/workflows/benchmarks_core.yml renamed to .github/workflows/benchmarks_compute.yml

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
name: Compute Benchmarks
22

33
on:
4-
# this workflow can by only triggered by other workflows
5-
# for example by: e2e_cuda.yml or e2e_opencl.yml
6-
workflow_call:
7-
# acceptable input from adapter-specific workflows
4+
# Can be triggered via manual "dispatch" (from workflow view in GitHub Actions tab)
5+
workflow_dispatch:
6+
# acceptable input for adapter-specific runs
87
inputs:
9-
name:
10-
description: Adapter name
11-
type: string
12-
required: true
138
str_name:
149
description: Formatted adapter name
15-
type: string
16-
required: true
17-
config:
18-
description: Params for sycl configuration
19-
type: string
10+
type: choice
2011
required: true
12+
default: 'level_zero'
13+
options:
14+
- level_zero
2115
unit:
2216
description: Test unit (cpu/gpu)
23-
type: string
17+
type: choice
2418
required: true
25-
runner_tag:
26-
description: Tag defined for the runner
27-
type: string
19+
default: 'gpu'
20+
options:
21+
- cpu
22+
- gpu
23+
pr_no:
24+
description: PR number (if 0, it'll run on the main)
25+
type: number
2826
required: true
29-
trigger:
30-
description: Type of workflow trigger
27+
bench_script_params:
28+
description: Parameters passed to script executing benchmark
3129
type: string
32-
required: true
33-
comment:
34-
description: Text if triggered by a comment
30+
required: false
31+
default: ''
32+
sycl_config_params:
33+
description: Extra params for SYCL configuration
3534
type: string
3635
required: false
36+
default: ''
3737

3838
permissions:
3939
contents: read
4040
pull-requests: write
4141

4242
jobs:
4343
e2e-build-hw:
44-
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks will not have the HW
44+
# Run only on upstream; forks will not have the HW
45+
if: github.repository == 'oneapi-src/unified-runtime'
4546
name: Build SYCL, UR, run Compute Benchmarks
4647
strategy:
4748
matrix:
4849
adapter: [
49-
{name: "${{inputs.name}}",
50-
str_name: "${{inputs.str_name}}",
51-
config: "${{inputs.config}}",
50+
{str_name: "${{inputs.str_name}}",
51+
sycl_config: "${{inputs.sycl_config_params}}",
5252
unit: "${{inputs.unit}}"}
5353
]
5454
build_type: [Release]
5555
compiler: [{c: clang, cxx: clang++}]
5656

57-
runs-on: ${{inputs.runner_tag}}
57+
runs-on: "${{inputs.str_name}}_PERF"
5858

5959
steps:
6060
# Workspace on self-hosted runners is not cleaned automatically.
@@ -67,15 +67,17 @@ jobs:
6767
6868
- name: Add comment to PR
6969
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
70-
if: ${{ always() && inputs.trigger != 'schedule' }}
70+
if: ${{ always() && inputs.pr_no != 0 }}
7171
with:
7272
script: |
73-
const adapter = '${{ matrix.adapter.name }}';
73+
const pr_no = '${{ inputs.pr_no }}';
74+
const adapter = '${{ matrix.adapter.str_name }}';
7475
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
75-
const body = `Compute Benchmarks ${adapter} run: \n${url}`;
76+
const params = '${{ inputs.bench_script_params }}';
77+
const body = `Compute Benchmarks ${adapter} run (with params: ${params}):\n${url}`;
7678
7779
github.rest.issues.createComment({
78-
issue_number: context.issue.number,
80+
issue_number: pr_no,
7981
owner: context.repo.owner,
8082
repo: context.repo.repo,
8183
body: body
@@ -86,13 +88,12 @@ jobs:
8688
with:
8789
path: ur-repo
8890

89-
# On issue_comment trigger (for PRs) we need to fetch special ref for
90-
# proper PR's merge commit. Note, this ref may be absent if the PR is already merged.
91+
# We need to fetch special ref for proper PR's merge commit. Note, this ref may be absent if the PR is already merged.
9192
- name: Fetch PR's merge commit
92-
if: ${{ inputs.trigger != 'schedule' }}
93+
if: ${{ inputs.pr_no != 0 }}
9394
working-directory: ${{github.workspace}}/ur-repo
9495
env:
95-
PR_NO: ${{github.event.issue.number}}
96+
PR_NO: ${{ inputs.pr_no }}
9697
run: |
9798
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/*
9899
git checkout origin/pr/${PR_NO}/merge
@@ -108,7 +109,7 @@ jobs:
108109
fetch-tags: false
109110

110111
- name: Set CUDA env vars
111-
if: matrix.adapter.name == 'CUDA'
112+
if: matrix.adapter.str_name == 'cuda'
112113
run: |
113114
echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV
114115
echo "LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
@@ -119,7 +120,7 @@ jobs:
119120
-t ${{matrix.build_type}}
120121
-o ${{github.workspace}}/sycl_build
121122
--cmake-gen "Ninja"
122-
--ci-defaults ${{matrix.adapter.config}}
123+
--ci-defaults ${{matrix.adapter.sycl_config}}
123124
--cmake-opt="-DLLVM_INSTALL_UTILS=ON"
124125
--cmake-opt="-DSYCL_PI_TESTS=OFF"
125126
--cmake-opt="-DSYCL_PI_UR_USE_FETCH_CONTENT=OFF"
@@ -165,17 +166,13 @@ jobs:
165166
run: |
166167
echo "ONEAPI_DEVICE_SELECTOR=${{ matrix.adapter.str_name }}:${{ matrix.adapter.unit }}" >> $GITHUB_ENV
167168
168-
- name: Extract arguments from comment
169-
id: args
170-
run: echo "ARGS=$(echo '${{ inputs.comment }}' | sed -n 's/.*\/benchmarks-[^ ]* \(.*\)/\1/p')" >> $GITHUB_ENV
171-
172169
- name: Run SYCL API Overhead benchmark
173170
id: benchmarks
174-
run: ${{github.workspace}}/ur-repo/.github/scripts/compute_benchmarks.py ${{github.workspace}}/compute-benchmarks-build/bin/ $ARGS
171+
run: ${{ github.workspace }}/ur-repo/.github/scripts/compute_benchmarks.py ${{ github.workspace }}/compute-benchmarks-build/bin/ ${{ inputs.bench_script_params }}
175172

176173
- name: Add comment to PR
177174
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
178-
if: ${{ always() && inputs.trigger != 'schedule' }}
175+
if: ${{ always() && inputs.pr_no != 0 }}
179176
with:
180177
script: |
181178
let markdown = ""
@@ -185,14 +182,16 @@ jobs:
185182
} catch(err) {
186183
}
187184
188-
const adapter = '${{ matrix.adapter.name }}';
185+
const pr_no = '${{ inputs.pr_no }}';
186+
const adapter = '${{ matrix.adapter.str_name }}';
189187
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
190188
const test_status = '${{ steps.benchmarks.outcome }}';
191189
const job_status = '${{ job.status }}';
192-
const body = `Compute Benchmarks ${adapter} run:\n${url}\nJob status: ${job_status}. Test status: ${test_status}.\n ${markdown}`;
190+
const params = '${{ inputs.bench_script_params }}';
191+
const body = `Compute Benchmarks ${adapter} run (with params: ${params}):\n${url}\nJob status: ${job_status}. Test status: ${test_status}.\n ${markdown}`;
193192
194193
github.rest.issues.createComment({
195-
issue_number: context.issue.number,
194+
issue_number: pr_no,
196195
owner: context.repo.owner,
197196
repo: context.repo.repo,
198197
body: body

.github/workflows/benchmarks_level_zero.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/cmake.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ concurrency:
88

99
permissions:
1010
contents: read
11+
pull-requests: write
1112

1213
jobs:
1314
ubuntu-build:
@@ -161,41 +162,60 @@ jobs:
161162
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short" --verbose
162163

163164
level-zero:
164-
if: github.repository == 'oneapi-src/unified-runtime'
165165
name: Level Zero
166166
uses: ./.github/workflows/build-hw-reusable.yml
167167
with:
168168
name: L0
169169

170170
opencl:
171-
if: github.repository == 'oneapi-src/unified-runtime'
172171
name: OpenCL
173172
uses: ./.github/workflows/build-hw-reusable.yml
174173
with:
175174
name: OPENCL
176175
platform: "Intel(R) OpenCL"
177176

178177
cuda:
179-
if: github.repository == 'oneapi-src/unified-runtime'
180178
name: CUDA
181179
uses: ./.github/workflows/build-hw-reusable.yml
182180
with:
183181
name: CUDA
184182

185183
hip:
186-
if: github.repository == 'oneapi-src/unified-runtime'
187184
name: HIP
188185
uses: ./.github/workflows/build-hw-reusable.yml
189186
with:
190187
name: HIP
191188

192189
native-cpu:
193-
if: github.repository == 'oneapi-src/unified-runtime'
194190
name: Native CPU
195191
uses: ./.github/workflows/build-hw-reusable.yml
196192
with:
197193
name: NATIVE_CPU
198194

195+
e2e-level-zero:
196+
name: E2E L0
197+
permissions:
198+
contents: read
199+
pull-requests: write
200+
needs: [ubuntu-build, level-zero]
201+
uses: ./.github/workflows/e2e_level_zero.yml
202+
203+
e2e-opencl:
204+
name: E2E OpenCL
205+
permissions:
206+
contents: read
207+
pull-requests: write
208+
needs: [ubuntu-build, opencl]
209+
uses: ./.github/workflows/e2e_opencl.yml
210+
211+
e2e-cuda:
212+
name: E2E CUDA
213+
permissions:
214+
contents: read
215+
pull-requests: write
216+
needs: [ubuntu-build, cuda]
217+
uses: ./.github/workflows/e2e_cuda.yml
218+
199219
windows-build:
200220
name: Build - Windows
201221
strategy:
@@ -211,6 +231,9 @@ jobs:
211231
adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}
212232
- adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}
213233
compiler: {c: clang-cl, cxx: clang-cl}
234+
# TODO: testing is flaky on windows-2022 in Release mode
235+
- os: 'windows-2022'
236+
build_type: Release
214237

215238
build_type: [Debug, Release]
216239
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
@@ -262,7 +285,6 @@ jobs:
262285
working-directory: ${{github.workspace}}/build
263286
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
264287

265-
266288
macos-build:
267289
name: Build - MacOS
268290
strategy:

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "CodeQL"
22

3-
on: [push, pull_request]
3+
on: [push]
44

55
concurrency:
66
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2525

2626
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
27+
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
2828
with:
2929
languages: cpp, python
3030

@@ -38,7 +38,7 @@ jobs:
3838
run: cmake --build ${{github.workspace}}/build -j $(nproc)
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
41+
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
4242

4343
analyze-windows:
4444
name: Analyze on Windows
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5555

5656
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
57+
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
5858
with:
5959
languages: cpp, python
6060

@@ -68,4 +68,4 @@ jobs:
6868
run: cmake --build ${{github.workspace}}/build -j $(nproc) --config Release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
71+
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7

0 commit comments

Comments
 (0)