Skip to content

Commit 80926d6

Browse files
[CI] Allow 2 bench scripts locations
On PRs based on main, the scripts location is "old" and not accesible. Pick location based on the dir existance. Step 'gather info' is in a 'weird' location, so solve it with 2 tries to execute the script. E.g. failure: https://github.com/intel/llvm/actions/runs/13787698847/job/38559543731#step:6:6
1 parent 72d8730 commit 80926d6

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ur-benchmarks-reusable.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,27 @@ jobs:
8080
git checkout origin/pr/${{ inputs.pr_no }}/merge
8181
git rev-parse origin/pr/${{ inputs.pr_no }}/merge
8282
83+
# TODO: As long as we didn't merge this workflow into main, we should allow both scripts location
84+
- name: Establish bench scripts location
85+
run: |
86+
if [ -d "${{github.workspace}}/sycl-repo/devops/scripts/benchmarks" ]; then
87+
echo "Bench scripts are in devops/scripts"
88+
echo "BENCH_SCRIPTS_DIR=${{github.workspace}}/sycl-repo/devops/scripts/benchmarks" >> $GITHUB_ENV
89+
elif [ -d "${{github.workspace}}/sycl-repo/unified-runtime/scripts/benchmarks" ]; then
90+
echo "Bench scripts are in unified-runtime/scripts"
91+
echo "BENCH_SCRIPTS_DIR=${{github.workspace}}/sycl-repo/unified-runtime/scripts/benchmarks" >> $GITHUB_ENV
92+
else
93+
echo "Bench scripts are absent...?"
94+
exit 1
95+
fi
96+
8397
- name: Create virtual environment
8498
run: python -m venv .venv
8599

86100
- name: Activate virtual environment and install pip packages
87101
run: |
88102
source .venv/bin/activate
89-
pip install -r ${{github.workspace}}/sycl-repo/devops/scripts/benchmarks/requirements.txt
103+
pip install -r ${BENCH_SCRIPTS_DIR}/requirements.txt
90104
91105
- name: Configure SYCL
92106
run: >
@@ -144,7 +158,7 @@ jobs:
144158
id: benchmarks
145159
run: >
146160
source .venv/bin/activate &&
147-
taskset -c "${{ env.CORES }}" ${{ github.workspace }}/sycl-repo/devops/scripts/benchmarks/main.py
161+
taskset -c "${{ env.CORES }}" ${BENCH_SCRIPTS_DIR}/main.py
148162
~/llvm_bench_workdir
149163
--sycl ${{ github.workspace }}/sycl_build
150164
--ur ${{ github.workspace }}/ur_install
@@ -198,6 +212,9 @@ jobs:
198212
path: benchmark_results_${{ inputs.pr_no }}.html
199213
key: benchmark-results-${{ inputs.pr_no }}-${{ matrix.adapter.str_name }}-${{ github.run_id }}
200214

215+
# TODO: As long as we didn't merge this workflow into main, we should allow both scripts location
201216
- name: Get information about platform
202217
if: ${{ always() }}
203-
run: ${{github.workspace}}/sycl-repo/devops/scripts/get_system_info.sh
218+
run: |
219+
${{github.workspace}}/sycl-repo/devops/scripts/get_system_info.sh || true
220+
${{github.workspace}}/sycl-repo/unified-runtime/.github/scripts/get_system_info.sh || true

0 commit comments

Comments
 (0)