Skip to content

Commit 0060067

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 5fc1293 commit 0060067

File tree

4 files changed

+115
-90
lines changed

4 files changed

+115
-90
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: 109 additions & 15 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+
# Only run on pull requests, when a benchmark-related files were changed.
8+
pull_request:
9+
# these paths are exactly the same as in sycl-linux-precommit.yml (to ignore over there)
10+
paths:
11+
- 'devops/scripts/benchmarks/**'
12+
- 'devops/actions/run-tests/benchmark/**'
13+
- '.github/workflows/sycl-ur-perf-benchmarking.yml'
14+
schedule:
15+
- cron: '0 0 * * *'
16+
# 3 hours ahead of SYCL nightly
417
workflow_dispatch:
518
inputs:
619
preset:
@@ -57,12 +70,12 @@ 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:
77+
# Manual trigger (dispatch) path:
78+
sanitize_inputs_dispatch:
6679
name: Sanitize inputs
6780
runs-on: ubuntu-latest
6881
env:
@@ -111,25 +124,24 @@ jobs:
111124
echo "Final sanitized values:"
112125
cat $GITHUB_OUTPUT
113126
114-
build_sycl:
127+
build_sycl_dispatch:
115128
name: Build SYCL
116-
needs: [ sanitize_inputs ]
129+
needs: [ sanitize_inputs_dispatch ]
117130
uses: ./.github/workflows/sycl-linux-build.yml
118131
with:
119-
build_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
132+
build_ref: ${{ needs.sanitize_inputs_dispatch.outputs.build_ref }}
120133
build_cache_root: "/__w/"
121134
build_cache_suffix: "prod_noassert"
122135
build_configure_extra_args: "--no-assertions"
123136
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
124137
cc: clang
125138
cxx: clang++
126139
changes: '[]'
127-
128140
toolchain_artifact: sycl_linux_prod_noassert
129141

130-
run_benchmarks_build:
131-
name: Run Benchmarks on Build
132-
needs: [ build_sycl, sanitize_inputs ]
142+
benchmark_dispatch:
143+
name: Benchmarks
144+
needs: [ build_sycl_dispatch, sanitize_inputs_dispatch ]
133145
strategy:
134146
matrix:
135147
include:
@@ -139,16 +151,98 @@ jobs:
139151
uses: ./.github/workflows/sycl-linux-run-tests.yml
140152
secrets: inherit
141153
with:
142-
name: Run compute-benchmarks (${{ matrix.save_name }}, ${{ matrix.runner }}, ${{ matrix.backend }})
154+
name: "Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
143155
runner: ${{ matrix.runner }}
144156
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
145157
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
146158
target_devices: ${{ matrix.backend }}
147159
tests_selector: benchmarks
148160
benchmark_upload_results: ${{ inputs.upload_results }}
149-
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
161+
benchmark_save_name: ${{ needs.sanitize_inputs_dispatch.outputs.benchmark_save_name }}
150162
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 }}
163+
repo_ref: ${{ needs.sanitize_inputs_dispatch.outputs.build_ref }}
164+
toolchain_artifact: ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact }}
165+
toolchain_artifact_filename: ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact_filename }}
166+
toolchain_decompress_command: ${{ needs.build_sycl_dispatch.outputs.toolchain_decompress_command }}
167+
# END manual trigger (dispatch) path
168+
169+
# Nightly benchmarking path:
170+
build_nightly:
171+
name: Build SYCL
172+
if: github.repository == 'intel/llvm' && github.event_name == 'schedule'
173+
uses: ./.github/workflows/sycl-linux-build.yml
174+
secrets: inherit
175+
with:
176+
build_cache_root: "/__w/"
177+
build_configure_extra_args: '--no-assertions'
178+
build_image: ghcr.io/intel/llvm/ubuntu2404_build:latest
179+
180+
toolchain_artifact: sycl_linux_default
181+
toolchain_artifact_filename: sycl_linux.tar.gz
182+
183+
benchmark_nightly:
184+
name: Benchmarks
185+
needs: [build_nightly]
186+
if: always() && !cancelled() && needs.build_nightly.outputs.build_conclusion == 'success'
187+
strategy:
188+
fail-fast: false
189+
matrix:
190+
runner: ['["PVC_PERF"]', '["BMG_PERF"]']
191+
backend: ['level_zero:gpu', 'level_zero_v2:gpu']
192+
include:
193+
- ref: ${{ github.sha }}
194+
save_name: 'Baseline'
195+
preset: 'Full'
196+
uses: ./.github/workflows/sycl-linux-run-tests.yml
197+
secrets: inherit
198+
with:
199+
name: "Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
200+
runner: ${{ matrix.runner }}
201+
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
202+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
203+
target_devices: ${{ matrix.backend }}
204+
tests_selector: benchmarks
205+
benchmark_upload_results: true
206+
benchmark_save_name: ${{ matrix.save_name }}
207+
benchmark_preset: ${{ matrix.preset }}
208+
repo_ref: ${{ matrix.ref }}
209+
toolchain_artifact: ${{ needs.build_nightly.outputs.toolchain_artifact }}
210+
toolchain_artifact_filename: ${{ needs.build_nightly.outputs.toolchain_artifact_filename }}
211+
toolchain_decompress_command: ${{ needs.build_nightly.outputs.toolchain_decompress_command }}
212+
# END nightly benchmarking path
213+
214+
# Benchmark framework builds and runs on PRs path:
215+
build_pr:
216+
name: Build SYCL
217+
if: always() && !cancelled() && github.event_name == 'pull_request'
218+
uses: ./.github/workflows/sycl-linux-build.yml
219+
with:
220+
build_ref: ${{ github.sha }}
221+
build_cache_root: "/__w/"
222+
build_cache_suffix: "default"
223+
# Docker image has last nightly pre-installed and added to the PATH
224+
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
225+
cc: clang
226+
cxx: clang++
227+
changes: ${{ needs.detect_changes.outputs.filters }}
228+
toolchain_artifact: sycl_linux_default
229+
230+
test_benchmark_framework:
231+
needs: [build_pr]
232+
if: always() && !cancelled() && needs.build_pr.outputs.build_conclusion == 'success'
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+
# END benchmark framework builds and runs on PRs path

0 commit comments

Comments
 (0)