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.
14name : Run Benchmarks
25
36on :
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 :
6477 options :
6578 - ' level_zero:gpu'
6679 - ' level_zero_v2:gpu'
67- # As of #17407, sycl-linux-build now builds v2 by default
6880
6981permissions : read-all
7082
7183jobs :
72- sanitize_inputs :
73- name : Sanitize inputs
84+ # Manual trigger (dispatch) path:
85+ sanitize_inputs_dispatch :
86+ name : ' [Dispatch] Sanitize inputs'
87+ if : github.event_name == 'workflow_dispatch'
7488 runs-on : ubuntu-latest
7589 env :
7690 COMMIT_HASH : ${{ inputs.commit_hash }}
@@ -118,25 +132,25 @@ jobs:
118132 echo "Final sanitized values:"
119133 cat $GITHUB_OUTPUT
120134
121- build_sycl :
122- name : Build SYCL
123- needs : [ sanitize_inputs ]
135+ build_sycl_dispatch :
136+ name : ' [Dispatch] Build SYCL'
137+ needs : [ sanitize_inputs_dispatch ]
124138 uses : ./.github/workflows/sycl-linux-build.yml
125139 with :
126- build_ref : ${{ needs.sanitize_inputs .outputs.build_ref }}
140+ build_ref : ${{ needs.sanitize_inputs_dispatch .outputs.build_ref }}
127141 build_cache_root : " /__w/"
128142 build_cache_suffix : " prod_noassert"
129143 build_configure_extra_args : " --no-assertions"
130144 build_image : " ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
131145 cc : clang
132146 cxx : clang++
133147 changes : ' []'
134-
135148 toolchain_artifact : sycl_linux_prod_noassert
136149
137- run_benchmarks_build :
138- name : Run Benchmarks on Build
139- needs : [ build_sycl, sanitize_inputs ]
150+ benchmark_dispatch :
151+ name : ' [Dispatch] Benchmarks'
152+ needs : [ build_sycl_dispatch, sanitize_inputs_dispatch ]
153+ if : always() && !cancelled() && needs.build_sycl_dispatch.outputs.build_conclusion == 'success'
140154 strategy :
141155 matrix :
142156 include :
@@ -146,17 +160,102 @@ jobs:
146160 uses : ./.github/workflows/sycl-linux-run-tests.yml
147161 secrets : inherit
148162 with :
149- name : Run compute-benchmarks (${{ matrix.save_name }}, ${{ matrix.runner }}, ${{ matrix.backend }})
163+ name : " Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
150164 runner : ${{ matrix.runner }}
151165 image : ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
152166 image_options : -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
153167 target_devices : ${{ matrix.backend }}
154168 tests_selector : benchmarks
155169 benchmark_upload_results : ${{ inputs.upload_results }}
156- benchmark_save_name : ${{ needs.sanitize_inputs .outputs.benchmark_save_name }}
170+ benchmark_save_name : ${{ needs.sanitize_inputs_dispatch .outputs.benchmark_save_name }}
157171 benchmark_preset : ${{ inputs.preset }}
158172 benchmark_exit_on_failure : ${{ inputs.exit_on_failure }}
159- repo_ref : ${{ needs.sanitize_inputs.outputs.build_ref }}
160- toolchain_artifact : ${{ needs.build_sycl.outputs.toolchain_artifact }}
161- toolchain_artifact_filename : ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
162- toolchain_decompress_command : ${{ needs.build_sycl.outputs.toolchain_decompress_command }}
173+ repo_ref : ${{ needs.sanitize_inputs_dispatch.outputs.build_ref }}
174+ toolchain_artifact : ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact }}
175+ toolchain_artifact_filename : ${{ needs.build_sycl_dispatch.outputs.toolchain_artifact_filename }}
176+ toolchain_decompress_command : ${{ needs.build_sycl_dispatch.outputs.toolchain_decompress_command }}
177+ # END manual trigger (dispatch) path
178+
179+ # Nightly benchmarking path:
180+ build_nightly :
181+ name : ' [Nightly] Build SYCL'
182+ if : github.repository == 'intel/llvm' && github.event_name == 'schedule'
183+ uses : ./.github/workflows/sycl-linux-build.yml
184+ secrets : inherit
185+ with :
186+ build_cache_root : " /__w/"
187+ build_configure_extra_args : ' --no-assertions'
188+ build_image : ghcr.io/intel/llvm/ubuntu2404_build:latest
189+
190+ toolchain_artifact : sycl_linux_default
191+ toolchain_artifact_filename : sycl_linux.tar.gz
192+
193+ benchmark_nightly :
194+ name : ' [Nightly] Benchmarks'
195+ needs : [build_nightly]
196+ if : always() && !cancelled() && needs.build_nightly.outputs.build_conclusion == 'success'
197+ strategy :
198+ fail-fast : false
199+ matrix :
200+ runner : ['["PVC_PERF"]', '["BMG_PERF"]']
201+ backend : ['level_zero:gpu', 'level_zero_v2:gpu']
202+ include :
203+ - ref : ${{ github.sha }}
204+ save_name : ' Baseline'
205+ preset : ' Full'
206+ uses : ./.github/workflows/sycl-linux-run-tests.yml
207+ secrets : inherit
208+ with :
209+ name : " Benchmarks (${{ matrix.runner }}, ${{ matrix.backend }}, preset: ${{ matrix.preset }})"
210+ runner : ${{ matrix.runner }}
211+ image : ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
212+ image_options : -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
213+ target_devices : ${{ matrix.backend }}
214+ tests_selector : benchmarks
215+ benchmark_upload_results : true
216+ benchmark_save_name : ${{ matrix.save_name }}
217+ benchmark_preset : ${{ matrix.preset }}
218+ repo_ref : ${{ matrix.ref }}
219+ toolchain_artifact : ${{ needs.build_nightly.outputs.toolchain_artifact }}
220+ toolchain_artifact_filename : ${{ needs.build_nightly.outputs.toolchain_artifact_filename }}
221+ toolchain_decompress_command : ${{ needs.build_nightly.outputs.toolchain_decompress_command }}
222+ # END nightly benchmarking path
223+
224+ # Benchmark framework builds and runs on PRs path:
225+ build_pr :
226+ name : ' [PR] Build SYCL'
227+ if : github.event_name == 'pull_request'
228+ uses : ./.github/workflows/sycl-linux-build.yml
229+ with :
230+ build_ref : ${{ github.sha }}
231+ build_cache_root : " /__w/"
232+ build_cache_suffix : " default"
233+ # Docker image has last nightly pre-installed and added to the PATH
234+ build_image : " ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
235+ cc : clang
236+ cxx : clang++
237+ changes : ${{ needs.detect_changes.outputs.filters }}
238+ toolchain_artifact : sycl_linux_default
239+
240+ # TODO: When we have stable BMG runner(s), consider moving this job to that runner.
241+ test_benchmark_framework :
242+ name : ' [PR] Benchmark suite testing'
243+ needs : [build_pr]
244+ if : always() && !cancelled() && needs.build_pr.outputs.build_conclusion == 'success'
245+ uses : ./.github/workflows/sycl-linux-run-tests.yml
246+ with :
247+ name : ' Framework test: PVC_PERF, L0, Minimal preset'
248+ runner : ' ["PVC_PERF"]'
249+ image : ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
250+ image_options : -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
251+ target_devices : ' level_zero:gpu'
252+ tests_selector : benchmarks
253+ benchmark_upload_results : false
254+ benchmark_preset : ' Minimal'
255+ benchmark_dry_run : true
256+ benchmark_exit_on_failure : true
257+ repo_ref : ${{ github.sha }}
258+ toolchain_artifact : ${{ needs.build.outputs.toolchain_artifact }}
259+ toolchain_artifact_filename : ${{ needs.build.outputs.toolchain_artifact_filename }}
260+ toolchain_decompress_command : ${{ needs.build.outputs.toolchain_decompress_command }}
261+ # END benchmark framework builds and runs on PRs path
0 commit comments