Skip to content

Commit 4450c66

Browse files
authored
Merge pull request #1226 from PatKamin/sycl-bench-compat
Add sycl benchmark to sycl compatibility workflow
2 parents e32fcc7 + 223f341 commit 4450c66

File tree

2 files changed

+69
-8
lines changed

2 files changed

+69
-8
lines changed

.github/workflows/nightly.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,5 +368,21 @@ jobs:
368368
pr_no: '0'
369369
bench_script_params: '--save Baseline_PVC'
370370

371+
Benchmarks-sycl:
372+
uses: ./.github/workflows/reusable_benchmarks.yml
373+
permissions:
374+
contents: write
375+
pull-requests: write
376+
with:
377+
pr_no: '0'
378+
bench_script_params: >-
379+
--adapter level_zero_v2
380+
--compute-runtime
381+
--build-igc
382+
--preset Minimal
383+
--exit-on-failure
384+
runner: 'L0_PERF_ARC'
385+
compatibility: 1
386+
371387
SYCL:
372388
uses: ./.github/workflows/reusable_sycl.yml

.github/workflows/reusable_benchmarks.yml

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ on:
2121
runner:
2222
required: false
2323
type: string
24-
default: 'L0_PERF'
24+
default: 'L0_PERF_PVC'
25+
compatibility:
26+
required: false
27+
type: string
28+
default: 0
29+
description: |
30+
Set it to 1 to run compatibility sycl benchmarks
2531
2632
permissions:
2733
contents: read
@@ -128,14 +134,15 @@ jobs:
128134
129135
- name: Install benchmarking scripts deps
130136
run: |
131-
python -m venv .venv
137+
python3 -m venv .venv
132138
source .venv/bin/activate
133139
echo "$PATH" >> $GITHUB_PATH
134140
pip install -r ${{github.workspace}}/sc/devops/scripts/benchmarks/requirements.txt
135141
136142
- name: Set core range and GPU mask
137143
run: |
138-
# Compute the core range for the second NUMA node; first node is for SYCL/UR jobs.
144+
# On the L0_PERF_PVC runner, compute the core range for the second NUMA node;
145+
# first node is for SYCL/UR jobs.
139146
# Skip the first 4 cores - the kernel is likely to schedule more work on these.
140147
CORES=$(lscpu | awk '
141148
/NUMA node1 CPU|On-line CPU/ {line=$0}
@@ -148,19 +155,56 @@ jobs:
148155
echo "Selected core: $CORES"
149156
echo "CORES=$CORES" >> $GITHUB_ENV
150157
151-
ZE_AFFINITY_MASK=1
158+
ZE_AFFINITY_MASK=${{ inputs.runner == 'L0_PERF_ARC' && '0' || '1' }}
152159
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
153160
154-
- name: Run UMF benchmarks
161+
- name: Download latest sycl
162+
if: inputs.compatibility == 1
163+
run: |
164+
llvm_tag=$(curl -s https://api.github.com/repos/intel/llvm/releases | awk -F'"' '/"tag_name": "nightly/ {print $4; exit}')
165+
download_url="https://github.com/intel/llvm/releases/download/${llvm_tag}/sycl_linux.tar.gz"
166+
echo "llvm tag: $llvm_tag"
167+
wget --no-verbose $download_url -O sycl_linux.tar.gz
168+
169+
- name: Unpack sycl
170+
if: inputs.compatibility == 1
171+
run: |
172+
mkdir -p sycl
173+
tar -xzf sycl_linux.tar.gz -C sycl --strip-components=1
174+
rm sycl_linux.tar.gz
175+
echo "SYCL_DIR=${{ github.workspace }}/sycl" >> $GITHUB_ENV
176+
echo "${{ github.workspace }}/sycl/bin" >> $GITHUB_PATH
177+
echo "LD_LIBRARY_PATH=${{ github.workspace }}/sycl/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
178+
179+
- name: Remove UMF libraries from sycl
180+
if: inputs.compatibility == 1
181+
run: rm -f ${{ env.SYCL_DIR }}/lib/libumf*
182+
183+
- name: Copy UMF libraries to sycl
184+
if: inputs.compatibility == 1
185+
run: |
186+
cp ${{ env.BUILD_DIR }}/lib/libumf* ${{ env.SYCL_DIR }}/lib/
187+
188+
- name: Run sycl-ls
189+
if: inputs.compatibility == 1
190+
env:
191+
LD_LIBRARY_PATH: ${{ env.SYCL_DIR }}/lib
192+
SYCL_UR_TRACE: 1
193+
SYCL_UR_USE_LEVEL_ZERO_V2: 1
194+
run: ${{ env.SYCL_DIR }}/bin/sycl-ls
195+
196+
- name: Run benchmarks
155197
id: benchmarks
198+
env:
199+
LD_LIBRARY_PATH: ${{ env.SYCL_DIR }}/lib
200+
CPATH: ${{ env.SYCL_DIR }}/include
156201
run: >
157202
taskset -c ${{ env.CORES }} ./sc/devops/scripts/benchmarks/main.py
158203
~/bench_workdir_umf
159-
--umf ${{env.BUILD_DIR}}
160-
--timeout 3000
161-
--output-html remote
162204
--results-dir ${{ github.workspace }}/results-repo
163205
--output-markdown
206+
${{ (inputs.compatibility == 0) && format('--umf {0} --timeout 3000 --output-html remote', env.BUILD_DIR) || '' }}
207+
${{ (inputs.compatibility == 1) && format('--sycl {0} --timeout 7200', env.SYCL_DIR) || '' }}
164208
${{ env.bench_params }}
165209
166210
# In case it failed to add a comment, we can still print the results.
@@ -196,6 +240,7 @@ jobs:
196240
197241
- name: Commit data.json and results directory
198242
working-directory: results-repo
243+
if: inputs.compatibility == 0
199244
run: |
200245
git config --global user.name "GitHub Actions Bot"
201246
git config --global user.email "[email protected]"

0 commit comments

Comments
 (0)