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 :
5770        options :
5871          - ' level_zero:gpu' 
5972          - ' level_zero_v2:gpu' 
60-             #  As of #17407, sycl-linux-build now builds v2 by default
6173
6274permissions : read-all 
6375
6476jobs :
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
0 commit comments