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+   #  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 :
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 :
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