Skip to content

[CI] Allow 2 bench scripts locations #17394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/ur-benchmarks-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,27 @@ jobs:
git checkout origin/pr/${{ inputs.pr_no }}/merge
git rev-parse origin/pr/${{ inputs.pr_no }}/merge

# TODO: As long as we didn't merge this workflow into main, we should allow both scripts location
- name: Establish bench scripts location
run: |
if [ -d "${{github.workspace}}/sycl-repo/devops/scripts/benchmarks" ]; then
echo "Bench scripts are in devops/scripts"
echo "BENCH_SCRIPTS_DIR=${{github.workspace}}/sycl-repo/devops/scripts/benchmarks" >> $GITHUB_ENV
elif [ -d "${{github.workspace}}/sycl-repo/unified-runtime/scripts/benchmarks" ]; then
echo "Bench scripts are in unified-runtime/scripts"
echo "BENCH_SCRIPTS_DIR=${{github.workspace}}/sycl-repo/unified-runtime/scripts/benchmarks" >> $GITHUB_ENV
else
echo "Bench scripts are absent...?"
exit 1
fi

- name: Create virtual environment
run: python -m venv .venv

- name: Activate virtual environment and install pip packages
run: |
source .venv/bin/activate
pip install -r ${{github.workspace}}/sycl-repo/devops/scripts/benchmarks/requirements.txt
pip install -r ${BENCH_SCRIPTS_DIR}/requirements.txt

- name: Configure SYCL
run: >
Expand Down Expand Up @@ -144,7 +158,7 @@ jobs:
id: benchmarks
run: >
source .venv/bin/activate &&
taskset -c "${{ env.CORES }}" ${{ github.workspace }}/sycl-repo/devops/scripts/benchmarks/main.py
taskset -c "${{ env.CORES }}" ${BENCH_SCRIPTS_DIR}/main.py
~/llvm_bench_workdir
--sycl ${{ github.workspace }}/sycl_build
--ur ${{ github.workspace }}/ur_install
Expand Down Expand Up @@ -198,6 +212,9 @@ jobs:
path: benchmark_results_${{ inputs.pr_no }}.html
key: benchmark-results-${{ inputs.pr_no }}-${{ matrix.adapter.str_name }}-${{ github.run_id }}

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