Skip to content

[CI] Enable UR runs in benchmarking CI #19753

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
merged 9 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ jobs:
save_name: ${{ inputs.benchmark_save_name }}
preset: ${{ inputs.benchmark_preset }}
dry_run: ${{ inputs.benchmark_dry_run }}
build_ref: ${{ inputs.repo_ref }}
env:
RUNNER_TAG: ${{ inputs.runner }}
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}
44 changes: 44 additions & 0 deletions devops/actions/run-tests/benchmark/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
preset:
type: string
required: True
build_ref:
type: string
required: False
default: ""
dry_run:
type: string
required: False
Expand Down Expand Up @@ -90,6 +94,45 @@ runs:

ZE_AFFINITY_MASK=0
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV

# Compute-benchmarks relies on UR static libraries, cmake config files, etc.
# DPC++ doesn't ship with these files. The easiest way of obtaining these
# files is to build from scratch.
#
# TODO This is not the best place for this. We should come up with
# alternatives. A suggestion: Output UR builds as artifacts in ur_build_hw.yml
# and unpack it here instead.
#
# If we insist on not building the UR again, sycl_linux_build.yml can be
# modified output the entire sycl build dir as an artifact, in which the
# intermediate files required can be stitched together from the build files.
# However, this is not exactly "clean" or "fun to maintain"...
- name: Build Unified Runtime
shell: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't run by default in precommit or postcommit right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, this workflow is completely separate from precommit/postcommit.

If we were to do this in precommit in the future, this solution would not suffice. I proposed in the comments that we have UR build workflows produce an UR artifact, but that would involve reorganizing the UR workflows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool thanks

run: |
# Sparse-checkout UR at build ref:
git clone --depth 1 --no-checkout https://github.com/intel/llvm ur
cd ur
git sparse-checkout init
git sparse-checkout set unified-runtime
git fetch origin ${{ inputs.build_ref }}
git checkout FETCH_HEAD

# Configure UR
mkdir build install
cmake -DCMAKE_BUILD_TYPE=Release \
-Sunified-runtime \
-Bbuild \
-DCMAKE_INSTALL_PREFIX=install \
-DUR_BUILD_TESTS=OFF \
-DUR_BUILD_ADAPTER_L0=ON \
-DUR_BUILD_ADAPTER_L0_V2=ON

# Build and install UR
cmake --build build -j "$(nproc)"
cmake --install build

cd -
- name: Checkout results repo
shell: bash
run: |
Expand Down Expand Up @@ -152,6 +195,7 @@ runs:
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py \
"$(realpath ./llvm_test_workdir)" \
--sycl "$(realpath ./toolchain)" \
--ur "$(realpath ./ur/install)" \
--adapter "$FORCELOAD_ADAPTER" \
--save "$SAVE_NAME" \
--output-html remote \
Expand Down
Loading