3737 runner :
3838 required : true
3939 type : string
40- default : ' level_zero_PERF'
4140
4241permissions :
4342 contents : write
4443 pull-requests : write
4544
4645jobs :
47- e2e-build-hw :
46+ benchmarks :
4847 name : Build SYCL, UR, run Compute Benchmarks
4948 strategy :
5049 matrix :
5453 }
5554 ]
5655 build_type : [Release]
57- compiler : [{c: clang, cxx: clang++}]
5856
5957 runs-on : " ${{ inputs.runner }}"
6058
@@ -92,12 +90,11 @@ jobs:
9290 ref : benchmark-results
9391 path : results-repo
9492
95- - name : Create virtual environment
96- run : python -m venv .venv
97-
98- - name : Activate virtual environment and install pip packages
93+ - name : Install Python requirements in venv
9994 run : |
95+ python -m venv .venv
10096 source .venv/bin/activate
97+ echo "$PATH" >> $GITHUB_PATH
10198 pip install -r sc/devops/scripts/benchmarks/requirements.txt
10299
103100 - name : Checkout SYCL
@@ -175,7 +172,6 @@ jobs:
175172 - name : Run benchmarks
176173 id : benchmarks
177174 run : >
178- source .venv/bin/activate &&
179175 taskset -c ${{ env.CORES }} ./sc/devops/scripts/benchmarks/main.py
180176 ~/ur_bench_workdir
181177 --sycl ${{ github.workspace }}/sycl_build
@@ -189,9 +185,10 @@ jobs:
189185 --preset ${{ inputs.preset }}
190186 ${{ inputs.bench_script_params }}
191187
188+ # In case it failed to add a comment, we can still print the results.
192189 - name : Print benchmark results
193- run : |
194- cat ${{ github.workspace }}/sc/devops/scripts/benchmarks /benchmark_results.md || true
190+ if : ${{ always() }}
191+ run : cat ${{ github.workspace }}/benchmark_results.md || true
195192
196193 - name : Add comment to PR
197194 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
@@ -201,7 +198,7 @@ jobs:
201198 let markdown = ""
202199 try {
203200 const fs = require('fs');
204- markdown = fs.readFileSync('sc/devops/scripts/benchmarks /benchmark_results.md', 'utf8');
201+ markdown = fs.readFileSync('${{ github.workspace }} /benchmark_results.md', 'utf8');
205202 } catch(err) {
206203 }
207204
@@ -227,7 +224,7 @@ jobs:
227224 git config --global user.email "actions@github.com"
228225
229226 for attempt in {1..5}; do
230- echo "Attempt $attempt to push changes"
227+ echo "Attempt # $attempt to push changes"
231228
232229 rm -f data.json
233230 cp ${{ github.workspace }}/sc/devops/scripts/benchmarks/html/data.json .
0 commit comments