Skip to content

Commit 519727e

Browse files
Merge pull request #2744 from lukaszstolarczuk/bench-fixes
[CI][Bench] Fix for pip packages and fix md file path
2 parents bf9c933 + bd9a056 commit 519727e

3 files changed

Lines changed: 17 additions & 20 deletions

File tree

.github/workflows/benchmarks-nightly.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
nightly:
13-
name: Compute Benchmarks Nightly level-zero PVC
13+
name: '[PVC] CB Nightly level-zero'
1414
uses: ./.github/workflows/benchmarks-reusable.yml
1515
with:
1616
str_name: 'level_zero'
@@ -23,10 +23,9 @@ jobs:
2323
runner: 'level_zero_PERF'
2424

2525
nightly2:
26-
# we need to wait until previous job is done so that the html report
27-
# contains both runs
26+
# uses the same machine, so let's just wait for the prev. job
2827
needs: nightly
29-
name: Compute Benchmarks Nightly level-zero v2 PVC
28+
name: '[PVC] CB Nightly level-zero v2'
3029
uses: ./.github/workflows/benchmarks-reusable.yml
3130
with:
3231
str_name: 'level_zero_v2'
@@ -39,7 +38,7 @@ jobs:
3938
runner: 'level_zero_PERF'
4039

4140
nightly3:
42-
name: Compute Benchmarks Nightly level-zero BMG
41+
name: '[BMG] CB Nightly level-zero'
4342
uses: ./.github/workflows/benchmarks-reusable.yml
4443
with:
4544
str_name: 'level_zero'
@@ -52,10 +51,9 @@ jobs:
5251
runner: 'DSS-L0-BMG'
5352

5453
nightly4:
55-
# we need to wait until previous job is done so that the html report
56-
# contains both runs
54+
# uses the same machine, so let's just wait for the prev. job
5755
needs: nightly3
58-
name: Compute Benchmarks Nightly level-zero v2 BMG
56+
name: '[BMG] CB Nightly level-zero v2'
5957
uses: ./.github/workflows/benchmarks-reusable.yml
6058
with:
6159
str_name: 'level_zero_v2'

.github/workflows/benchmarks-reusable.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ on:
3737
runner:
3838
required: true
3939
type: string
40-
default: 'level_zero_PERF'
4140

4241
permissions:
4342
contents: write
4443
pull-requests: write
4544

4645
jobs:
47-
e2e-build-hw:
46+
benchmarks:
4847
name: Build SYCL, UR, run Compute Benchmarks
4948
strategy:
5049
matrix:
@@ -54,7 +53,6 @@ jobs:
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 .

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ on:
2525
type: number
2626
required: true
2727
bench_script_params:
28+
# If you want to save the results of the manual run in 'benchmark-results' branch,
29+
# you have to pass '--save XXX', where XXX is the label of your results.
2830
description: Parameters passed to the script executing benchmark
2931
type: string
3032
required: false

0 commit comments

Comments
 (0)