Skip to content

Commit 5493c53

Browse files
authored
[CI] Enable UR runs in benchmarking CI (#19753)
Temporary change enabling UR benchmarking. This is not the most ideal solution, but currently no benchmarking data is being collected for the UR; this data is needed urgently. A proper solution can be discussed after UR benchmarking has been re-enabled. **Note:** The new benchmark CI runs are using a docker environment, there seems to be a very consistent performance penalty of 2 microseconds as a result compared to previous UR benchmark CI runs that are not using a docker environment. Please see https://intel.github.io/llvm/benchmarks/?tags=UR&runs=Baseline_PVC_L0%2CCommit5661e7275b64a6c00a96ae295815f40a9384e958_PVC_L0 : this compares performance of latest commit with commit 5661e72, which was the commit used to benchmark the last run result from July 30th. I am currently looking into ways to reduce this penalty, for now I am opening this PR as the data is still useful. It's worth noting that SYCL only incurred 0.5-1 microsecond penalty from this move, so there may be room for improvement here.
1 parent 2c6a397 commit 5493c53

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ jobs:
358358
save_name: ${{ inputs.benchmark_save_name }}
359359
preset: ${{ inputs.benchmark_preset }}
360360
dry_run: ${{ inputs.benchmark_dry_run }}
361+
build_ref: ${{ inputs.repo_ref }}
361362
env:
362363
RUNNER_TAG: ${{ inputs.runner }}
363364
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}

devops/actions/run-tests/benchmark/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
preset:
2626
type: string
2727
required: True
28+
build_ref:
29+
type: string
30+
required: False
31+
default: ""
2832
dry_run:
2933
type: string
3034
required: False
@@ -90,6 +94,45 @@ runs:
9094
9195
ZE_AFFINITY_MASK=0
9296
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
97+
98+
# Compute-benchmarks relies on UR static libraries, cmake config files, etc.
99+
# DPC++ doesn't ship with these files. The easiest way of obtaining these
100+
# files is to build from scratch.
101+
#
102+
# TODO This is not the best place for this. We should come up with
103+
# alternatives. A suggestion: Output UR builds as artifacts in ur_build_hw.yml
104+
# and unpack it here instead.
105+
#
106+
# If we insist on not building the UR again, sycl_linux_build.yml can be
107+
# modified output the entire sycl build dir as an artifact, in which the
108+
# intermediate files required can be stitched together from the build files.
109+
# However, this is not exactly "clean" or "fun to maintain"...
110+
- name: Build Unified Runtime
111+
shell: bash
112+
run: |
113+
# Sparse-checkout UR at build ref:
114+
git clone --depth 1 --no-checkout https://github.com/intel/llvm ur
115+
cd ur
116+
git sparse-checkout init
117+
git sparse-checkout set unified-runtime
118+
git fetch origin ${{ inputs.build_ref }}
119+
git checkout FETCH_HEAD
120+
121+
# Configure UR
122+
mkdir build install
123+
cmake -DCMAKE_BUILD_TYPE=Release \
124+
-Sunified-runtime \
125+
-Bbuild \
126+
-DCMAKE_INSTALL_PREFIX=install \
127+
-DUR_BUILD_TESTS=OFF \
128+
-DUR_BUILD_ADAPTER_L0=ON \
129+
-DUR_BUILD_ADAPTER_L0_V2=ON
130+
131+
# Build and install UR
132+
cmake --build build -j "$(nproc)"
133+
cmake --install build
134+
135+
cd -
93136
- name: Checkout results repo
94137
shell: bash
95138
run: |
@@ -152,6 +195,7 @@ runs:
152195
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py \
153196
"$(realpath ./llvm_test_workdir)" \
154197
--sycl "$(realpath ./toolchain)" \
198+
--ur "$(realpath ./ur/install)" \
155199
--adapter "$FORCELOAD_ADAPTER" \
156200
--save "$SAVE_NAME" \
157201
--output-html remote \

0 commit comments

Comments
 (0)