Skip to content

Commit b3880c9

Browse files
[CI][Bench] Combine all benchmark jobs in one workflow
1. Right now changing only benchmark framework triggers all SYCL build. Thanks to this change only relevant changes are triggered for testing framework. 2. Nightly build was seperated. I believe keeping everything in one place makes it easier to maintain changes. No changes in logic/builds were made in this commit - only minor cleanups like names, plus changed the triggers.
1 parent d71c393 commit b3880c9

File tree

5 files changed

+125
-92
lines changed

5 files changed

+125
-92
lines changed

.github/workflows/sycl-detect-changes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ jobs:
6767
- devops/dependencies-igc-dev.json
6868
benchmarks:
6969
- 'devops/scripts/benchmarks/**'
70+
- 'devops/actions/run-tests/benchmark/**'
71+
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
7072
perf-tests:
7173
- sycl/test-e2e/PerformanceTests/**
7274
esimd:

.github/workflows/sycl-linux-precommit.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- sycl
1010
- sycl-rel-**
1111
# Do not run builds if changes are only in the following locations
12+
# Note: benchmark-related paths are the same as in sycl-ur-perf-benchmarking.yml (to run there instead)
1213
paths-ignore:
1314
- '.github/ISSUE_TEMPLATE/**'
1415
- '.github/CODEOWNERS'
@@ -31,6 +32,9 @@ on:
3132
- 'unified-runtime/test/**'
3233
- 'unified-runtime/third_party/**'
3334
- 'unified-runtime/tools/**'
35+
- 'devops/scripts/benchmarks/**'
36+
- 'devops/actions/run-tests/benchmark/**'
37+
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
3438

3539
concurrency:
3640
# Cancel a currently running workflow from the same PR, branch or tag.
@@ -224,28 +228,6 @@ jobs:
224228
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || 'false'}}
225229
env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }}
226230

227-
test_benchmark_scripts:
228-
needs: [build, detect_changes]
229-
if: |
230-
always() && !cancelled()
231-
&& needs.build.outputs.build_conclusion == 'success'
232-
&& contains(needs.detect_changes.outputs.filters, 'benchmarks')
233-
uses: ./.github/workflows/sycl-linux-run-tests.yml
234-
with:
235-
name: Benchmark suite precommit testing
236-
runner: '["PVC_PERF"]'
237-
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
238-
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
239-
target_devices: 'level_zero:gpu'
240-
tests_selector: benchmarks
241-
benchmark_upload_results: false
242-
benchmark_preset: 'Minimal'
243-
benchmark_dry_run: true
244-
repo_ref: ${{ github.sha }}
245-
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
246-
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
247-
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
248-
249231
test-perf:
250232
needs: [build, detect_changes]
251233
if: |

.github/workflows/sycl-nightly-benchmarking.yml

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

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 115 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
# A combined workflow for all benchmarks-related jobs for SYCL and UR.
2+
# Supports both manual triggering (dispatch) and nightly runs.
3+
# It also tests changes to benchmark scripts/framework in PR, if modified.
14
name: Run Benchmarks
25

36
on:
7+
schedule:
8+
# 3 hours ahead of SYCL nightly
9+
- cron: '0 0 * * *'
10+
# Run on pull requests only when a benchmark-related files were changed.
11+
pull_request:
12+
# These paths are exactly the same as in sycl-linux/windows-precommit.yml (to ignore over there)
13+
paths:
14+
- 'devops/scripts/benchmarks/**'
15+
- 'devops/actions/run-tests/benchmark/**'
16+
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
417
workflow_dispatch:
518
inputs:
619
preset:
@@ -57,13 +70,14 @@ on:
5770
options:
5871
- 'level_zero:gpu'
5972
- 'level_zero_v2:gpu'
60-
# As of #17407, sycl-linux-build now builds v2 by default
6173

6274
permissions: read-all
6375

6476
jobs:
65-
sanitize_inputs:
66-
name: Sanitize inputs
77+
# Manual trigger (dispatch) path:
78+
sanitize_inputs_dispatch:
79+
name: '[Dispatch] Sanitize inputs'
80+
if: github.event_name == 'workflow_dispatch'
6781
runs-on: ubuntu-latest
6882
env:
6983
COMMIT_HASH: ${{ inputs.commit_hash }}
@@ -111,25 +125,25 @@ jobs:
111125
echo "Final sanitized values:"
112126
cat $GITHUB_OUTPUT
113127
114-
build_sycl:
115-
name: Build SYCL
116-
needs: [ sanitize_inputs ]
128+
build_sycl_dispatch:
129+
name: '[Dispatch] Build SYCL'
130+
needs: [ sanitize_inputs_dispatch ]
117131
uses: ./.github/workflows/sycl-linux-build.yml
118132
with:
119-
build_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
133+
build_ref: ${{ needs.sanitize_inputs_dispatch.outputs.build_ref }}
120134
build_cache_root: "/__w/"
121135
build_cache_suffix: "prod_noassert"
122136
build_configure_extra_args: "--no-assertions"
123137
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
124138
cc: clang
125139
cxx: clang++
126140
changes: '[]'
127-
128141
toolchain_artifact: sycl_linux_prod_noassert
129142

130-
run_benchmarks_build:
131-
name: Run Benchmarks on Build
132-
needs: [ build_sycl, sanitize_inputs ]
143+
benchmark_dispatch:
144+
name: '[Dispatch] Benchmarks'
145+
needs: [ build_sycl_dispatch, sanitize_inputs_dispatch ]
146+
if: always() && !cancelled() && needs.build_sycl_dispatch.outputs.build_conclusion == 'success'
133147
strategy:
134148
matrix:
135149
include:
@@ -139,16 +153,100 @@ jobs:
139153
uses: ./.github/workflows/sycl-linux-run-tests.yml
140154
secrets: inherit
141155
with:
142-
name: Run compute-benchmarks (${{ matrix.save_name }}, ${{ matrix.runner }}, ${{ matrix.backend }})
156+
name: "Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
143157
runner: ${{ matrix.runner }}
144158
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
145159
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
146160
target_devices: ${{ matrix.backend }}
147161
tests_selector: benchmarks
148162
benchmark_upload_results: ${{ inputs.upload_results }}
149-
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
163+
benchmark_save_name: ${{ needs.sanitize_inputs_dispatch.outputs.benchmark_save_name }}
150164
benchmark_preset: ${{ inputs.preset }}
151-
repo_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
152-
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
153-
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
154-
toolchain_decompress_command: ${{ needs.build_sycl.outputs.toolchain_decompress_command }}
165+
repo_ref: ${{ needs.sanitize_inputs_dispatch.outputs.build_ref }}
166+
toolchain_artifact: ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact }}
167+
toolchain_artifact_filename: ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact_filename }}
168+
toolchain_decompress_command: ${{ needs.build_sycl_dispatch.outputs.toolchain_decompress_command }}
169+
# END manual trigger (dispatch) path
170+
171+
# Nightly benchmarking path:
172+
build_nightly:
173+
name: '[Nightly] Build SYCL'
174+
if: github.repository == 'intel/llvm' && github.event_name == 'schedule'
175+
uses: ./.github/workflows/sycl-linux-build.yml
176+
secrets: inherit
177+
with:
178+
build_cache_root: "/__w/"
179+
build_configure_extra_args: '--no-assertions'
180+
build_image: ghcr.io/intel/llvm/ubuntu2404_build:latest
181+
182+
toolchain_artifact: sycl_linux_default
183+
toolchain_artifact_filename: sycl_linux.tar.gz
184+
185+
benchmark_nightly:
186+
name: '[Nightly] Benchmarks'
187+
needs: [build_nightly]
188+
if: always() && !cancelled() && needs.build_nightly.outputs.build_conclusion == 'success'
189+
strategy:
190+
fail-fast: false
191+
matrix:
192+
runner: ['["PVC_PERF"]', '["BMG_PERF"]']
193+
backend: ['level_zero:gpu', 'level_zero_v2:gpu']
194+
include:
195+
- ref: ${{ github.sha }}
196+
save_name: 'Baseline'
197+
preset: 'Full'
198+
uses: ./.github/workflows/sycl-linux-run-tests.yml
199+
secrets: inherit
200+
with:
201+
name: "Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
202+
runner: ${{ matrix.runner }}
203+
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
204+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
205+
target_devices: ${{ matrix.backend }}
206+
tests_selector: benchmarks
207+
benchmark_upload_results: true
208+
benchmark_save_name: ${{ matrix.save_name }}
209+
benchmark_preset: ${{ matrix.preset }}
210+
repo_ref: ${{ matrix.ref }}
211+
toolchain_artifact: ${{ needs.build_nightly.outputs.toolchain_artifact }}
212+
toolchain_artifact_filename: ${{ needs.build_nightly.outputs.toolchain_artifact_filename }}
213+
toolchain_decompress_command: ${{ needs.build_nightly.outputs.toolchain_decompress_command }}
214+
# END nightly benchmarking path
215+
216+
# Benchmark framework builds and runs on PRs path:
217+
build_pr:
218+
name: '[PR] Build SYCL'
219+
if: github.event_name == 'pull_request'
220+
uses: ./.github/workflows/sycl-linux-build.yml
221+
with:
222+
build_ref: ${{ github.sha }}
223+
build_cache_root: "/__w/"
224+
build_cache_suffix: "default"
225+
# Docker image has last nightly pre-installed and added to the PATH
226+
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
227+
cc: clang
228+
cxx: clang++
229+
changes: ${{ needs.detect_changes.outputs.filters }}
230+
toolchain_artifact: sycl_linux_default
231+
232+
# TODO: When we have stable BMG runner(s), consider moving this job to that runner.
233+
test_benchmark_framework:
234+
name: '[PR] Benchmark suite testing'
235+
needs: [build_pr]
236+
if: always() && !cancelled() && needs.build_pr.outputs.build_conclusion == 'success'
237+
uses: ./.github/workflows/sycl-linux-run-tests.yml
238+
with:
239+
name: 'Framework test: PVC_PERF, L0, Minimal preset'
240+
runner: '["PVC_PERF"]'
241+
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
242+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
243+
target_devices: 'level_zero:gpu'
244+
tests_selector: benchmarks
245+
benchmark_upload_results: false
246+
benchmark_preset: 'Minimal'
247+
benchmark_dry_run: true
248+
repo_ref: ${{ github.sha }}
249+
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
250+
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
251+
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
252+
# END benchmark framework builds and runs on PRs path

.github/workflows/sycl-windows-precommit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- llvmspirv_pulldown
88
- sycl-rel-**
99
# Do not run builds if changes are only in the following locations
10+
# Note: benchmark-related paths are the same as in sycl-ur-perf-benchmarking.yml (to run there instead)
1011
paths-ignore:
1112
- '.github/ISSUE_TEMPLATE/**'
1213
- '.github/CODEOWNERS'
@@ -31,6 +32,9 @@ on:
3132
- 'unified-runtime/test/**'
3233
- 'unified-runtime/third_party/**'
3334
- 'unified-runtime/tools/**'
35+
- 'devops/scripts/benchmarks/**'
36+
- 'devops/actions/run-tests/benchmark/**'
37+
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
3438

3539
permissions: read-all
3640

0 commit comments

Comments
 (0)