@@ -2,7 +2,8 @@ name: 'Run benchmarks'
22
33# This action assumes the following prerequisites:
44#
5- # - SYCL is placed in ./toolchain -- TODO change this
5+ # - SYCL is accessible in the system (nightly image provides it within /opt/sycl),
6+ # or SYCL is placed in ./toolchain (TODO: change this??). The second option has higher priority.
67# - /devops has been checked out in ./devops.
78# - env.GITHUB_TOKEN was properly set, because according to Github, that's
89# apparently the recommended way to pass a secret into a github action:
@@ -113,21 +114,23 @@ runs:
113114 # modified output the entire sycl build dir as an artifact, in which the
114115 # intermediate files required can be stitched together from the build files.
115116 # However, this is not exactly "clean" or "fun to maintain"...
116- - name : Build LLVM
117+ - name : Build Unified Runtime
117118 shell : bash
118119 run : |
119- echo "::group::checkout_llvm"
120+ # Build Unified Runtime
121+ echo "::group::checkout_llvm_ur"
122+
120123 # Sparse-checkout UR at build ref:
121124 git clone --depth 1 --no-checkout https://github.com/intel/llvm ur
122125 cd ur
123126 git sparse-checkout init
124127 git sparse-checkout set unified-runtime
125128 git fetch origin ${{ inputs.build_ref }}
126129 git checkout FETCH_HEAD
130+
127131 echo "::endgroup::"
128- echo "::group::configure_llvm "
132+ echo "::group::configure_llvm_ur "
129133
130- # Configure UR
131134 mkdir build install
132135 cmake -DCMAKE_BUILD_TYPE=Release \
133136 -Sunified-runtime \
@@ -138,45 +141,20 @@ runs:
138141 -DUR_BUILD_ADAPTER_L0_V2=ON
139142
140143 echo "::endgroup::"
141- echo "::group::build_and_install_llvm "
144+ echo "::group::build_and_install_llvm_ur "
142145
143146 cmake --build build -j "$(nproc)"
144147 cmake --install build
145148
146149 cd -
147150
148- echo "::endgroup::"
149- # Install level zero v1.25.2
150- # This is to have the latest level zero required by Compute Benchmarks
151- # Remove this w/a once the sycl nightly images are updated to have level zero v1.25.2
152- - name : Install level zero v1.25.2
153- shell : bash
154- run : |
155- echo "::group::checkout_level_zero"
156- # Checkout Level Zero at build ref:
157- wget https://github.com/oneapi-src/level-zero/archive/refs/tags/v1.25.2.tar.gz -O level-zero-v1.25.2.tar.gz
158- tar -xvf level-zero-v1.25.2.tar.gz
159- cd level-zero-1.25.2
160-
161- echo "::endgroup::"
162- echo "::group::configure_level_zero"
163-
164- cmake -DCMAKE_BUILD_TYPE=Release \
165- -Bbuild
166-
167- echo "::endgroup::"
168- echo "::group::build_and_install_level_zero"
169-
170- cmake --build build -j "$(nproc)"
171- sudo cmake --install build
172-
173- cd -
174151 echo "::endgroup::"
175152 # Linux tools installed during docker creation may not match the self-hosted
176153 # kernel version, so we need to install the correct version here.
177154 - name : Install perf in version matching the host kernel
178155 shell : bash
179156 run : |
157+ # Install perf in version matching the host kernel
180158 echo "::group::install_linux_tools"
181159 sudo apt-get update
182160 sudo apt-get install -y linux-tools-$(uname -r)
@@ -201,8 +179,8 @@ runs:
201179 SAVE_PREFIX : ${{ inputs.save_name }}
202180 shell : bash
203181 run : |
204- # TODO generate summary + display helpful message here
205- export CMPLR_ROOT=./toolchain
182+ # Build and run benchmarks
183+
206184 echo "::group::install_python_deps"
207185 echo "Installing python dependencies..."
208186 # Using --break-system-packages because:
@@ -212,9 +190,11 @@ runs:
212190 # - apt is unable to install anything due to unresolved dpkg dependencies,
213191 # as a result of how the sycl nightly images are created
214192 pip install --user --break-system-packages -r ./devops/scripts/benchmarks/requirements.txt
193+
215194 echo "::endgroup::"
216- echo "::group::sycl_ls "
195+ echo "::group::establish_parameters_and_vars "
217196
197+ export CMPLR_ROOT=./toolchain
218198 # By default, the benchmark scripts forceload level_zero
219199 FORCELOAD_ADAPTER="${ONEAPI_DEVICE_SELECTOR%%:*}"
220200 echo "Adapter: $FORCELOAD_ADAPTER"
@@ -248,7 +228,9 @@ runs:
248228 # docker images are built nightly.
249229 export COMPUTE_RUNTIME_TAG_CACHE="$(cat ./devops/dependencies.json | jq -r .linux.compute_runtime.github_tag)"
250230
251- sycl-ls
231+ echo "::endgroup::"
232+ echo "::group::sycl_ls"
233+ sycl-ls --verbose
252234 echo "::endgroup::"
253235 echo "::group::run_benchmarks"
254236
@@ -285,7 +267,11 @@ runs:
285267
286268 echo "::endgroup::"
287269
288- LLVM_BENCHMARKS_UNIT_TESTING=1 COMPUTE_BENCHMARKS_BUILD_PATH=$WORKDIR/compute-benchmarks-build python3 ./devops/scripts/benchmarks/tests/test_integration.py
270+ # Run integration tests
271+ # NOTE: Each integration test prints its own group name as part of test script
272+ export LLVM_BENCHMARKS_UNIT_TESTING=1
273+ export COMPUTE_BENCHMARKS_BUILD_PATH=$WORKDIR/compute-benchmarks-build
274+ python3 ./devops/scripts/benchmarks/tests/test_integration.py
289275
290276 - name : Cache changes and upload github summary
291277 if : always()
0 commit comments