Skip to content

Commit 7be6546

Browse files
committed
Add sycl benchmark to Nightly benchmark workflow
1 parent 58ceb32 commit 7be6546

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

.github/workflows/nightly.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,5 +353,21 @@ jobs:
353353
pr_no: '0'
354354
bench_script_params: '--save Baseline_PVC'
355355

356+
Benchmarks-sycl:
357+
uses: ./.github/workflows/reusable_benchmarks.yml
358+
permissions:
359+
contents: write
360+
pull-requests: write
361+
with:
362+
pr_no: '0'
363+
bench_script_params: >-
364+
--adapter level_zero_v2
365+
--compute-runtime
366+
--build-igc
367+
--preset Minimal
368+
--exit-on-failure
369+
--save Baseline_Arc
370+
runner: 'L0_PERF_GPU'
371+
356372
SYCL:
357373
uses: ./.github/workflows/reusable_sycl.yml

.github/workflows/reusable_benchmarks.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ jobs:
128128
129129
- name: Install benchmarking scripts deps
130130
run: |
131-
python -m venv .venv
131+
python3 -m venv .venv
132132
source .venv/bin/activate
133133
pip install -r ${{github.workspace}}/sc/devops/scripts/benchmarks/requirements.txt
134134
135135
- name: Set core range and GPU mask
136136
run: |
137-
# Compute the core range for the second NUMA node; first node is for SYCL/UR jobs.
137+
# On the L0_PERF runner, compute the core range for the second NUMA node;
138+
# first node is for SYCL/UR jobs.
138139
# Skip the first 4 cores - the kernel is likely to schedule more work on these.
139140
CORES=$(lscpu | awk '
140141
/NUMA node1 CPU|On-line CPU/ {line=$0}
@@ -147,20 +148,57 @@ jobs:
147148
echo "Selected core: $CORES"
148149
echo "CORES=$CORES" >> $GITHUB_ENV
149150
150-
ZE_AFFINITY_MASK=1
151+
ZE_AFFINITY_MASK=${{ inputs.runner == 'L0_PERF_GPU' && '0' || '1' }}
151152
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
152153
153-
- name: Run UMF benchmarks
154+
- name: Download latest sycl
155+
if: inputs.runner == 'L0_PERF_GPU'
156+
run: |
157+
llvm_tag=$(curl -s https://api.github.com/repos/intel/llvm/releases | awk -F'"' '/"tag_name": "nightly/ {print $4; exit}')
158+
download_url="https://github.com/intel/llvm/releases/download/${llvm_tag}/sycl_linux.tar.gz"
159+
echo "llvm tag: $llvm_tag"
160+
wget --no-verbose $download_url -O sycl_linux.tar.gz
161+
162+
- name: Unpack sycl
163+
if: inputs.runner == 'L0_PERF_GPU'
164+
run: |
165+
mkdir -p sycl
166+
tar -xzf sycl_linux.tar.gz -C sycl --strip-components=1
167+
rm sycl_linux.tar.gz
168+
echo "SYCL_DIR=${{ github.workspace }}/sycl" >> $GITHUB_ENV
169+
echo "${{ github.workspace }}/sycl/bin" >> $GITHUB_PATH
170+
echo "LD_LIBRARY_PATH=${{ github.workspace }}/sycl/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
171+
172+
- name: Remove UMF libraries from sycl
173+
if: inputs.runner == 'L0_PERF_GPU'
174+
run: rm -f ${{ env.SYCL_DIR }}/lib/libumf*
175+
176+
- name: Copy UMF libraries to sycl
177+
if: inputs.runner == 'L0_PERF_GPU'
178+
run: |
179+
cp ${{ env.BUILD_DIR }}/lib/libumf* ${{ env.SYCL_DIR }}/lib/
180+
181+
- name: Run sycl-ls
182+
if: inputs.runner == 'L0_PERF_GPU'
183+
env:
184+
LD_LIBRARY_PATH: ${{ env.SYCL_DIR }}/lib
185+
SYCL_UR_TRACE: 1
186+
SYCL_UR_USE_LEVEL_ZERO_V2: 1
187+
run: ${{ env.SYCL_DIR }}/bin/sycl-ls
188+
189+
- name: Run benchmarks
154190
id: benchmarks
191+
env:
192+
LD_LIBRARY_PATH: ${{ env.SYCL_DIR }}/lib
193+
CPATH: ${{ env.SYCL_DIR }}/include
155194
run: >
156195
source .venv/bin/activate &&
157196
taskset -c ${{ env.CORES }} ./sc/devops/scripts/benchmarks/main.py
158197
~/bench_workdir_umf
159-
--umf ${{env.BUILD_DIR}}
160-
--timeout 3000
161-
--output-html remote
162198
--results-dir ${{ github.workspace }}/results-repo
163199
--output-markdown
200+
${{ (inputs.runner == 'L0_PERF') && format('--umf {0} --timeout 3000 --output-html remote', env.BUILD_DIR) || '' }}
201+
${{ (inputs.runner == 'L0_PERF_GPU') && format('--sycl {0} --timeout 7200', env.SYCL_DIR) || '' }}
164202
${{ env.bench_params }}
165203
166204
# In case it failed to add a comment, we can still print the results.
@@ -196,6 +234,7 @@ jobs:
196234
197235
- name: Commit data.json and results directory
198236
working-directory: results-repo
237+
if: inputs.runner == 'L0_PERF'
199238
run: |
200239
git config --global user.name "GitHub Actions Bot"
201240
git config --global user.email "actions@github.com"

0 commit comments

Comments
 (0)