From 712c5ae731bcc7575d6b6fda1818c334ebda60af Mon Sep 17 00:00:00 2001 From: Ian Li Date: Fri, 8 Aug 2025 14:19:39 -0700 Subject: [PATCH 1/9] enable Ur runs --- .github/workflows/sycl-linux-run-tests.yml | 1 + devops/actions/run-tests/benchmark/action.yml | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index f37b5e59a54a6..c3ece965a7a34 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -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 }} diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index 0f737d004b9f6..a50fa869f36a1 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -25,6 +25,10 @@ inputs: preset: type: string required: True + build_ref: + type: string + required: False + default: "" dry_run: type: string required: False @@ -90,6 +94,41 @@ 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 + run: | + # Sparse-checkout UR at build ref: + mkdir ur; cd ur + git clone --depth 1 --no-checkout https://github.com/intel/llvm + git sparse-checkout init + git sparse-checkout set unified-runtime + git checkout ${{ inputs.build_ref }} + + # Configure UR + mkdir build install + cmake -DCMAKE_BUILD_TYPE=Release \ + -Sunified-runtime \ + -Bbuild \ + -DUR_BUILD_TESTS=OFF \ + -DUR_BUILD_ADAPTER_L0=ON \ + -DUR_BUILD_ADAPTER_L0_V2=ON + + # Build UR + cmake --build build -j "$(nproc)" + cmake --install install - name: Checkout results repo shell: bash run: | @@ -152,6 +191,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 \ From 2464d2b2ce9e3f30a3b8ef5e2e7d77e00d7c3dc0 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Fri, 8 Aug 2025 14:42:58 -0700 Subject: [PATCH 2/9] fix bug --- devops/actions/run-tests/benchmark/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index a50fa869f36a1..47048d96f8d6f 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -111,8 +111,8 @@ runs: shell: bash run: | # Sparse-checkout UR at build ref: - mkdir ur; cd ur - git clone --depth 1 --no-checkout https://github.com/intel/llvm + 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 checkout ${{ inputs.build_ref }} From 1b562a710020a8c2e448554023a9ef915ddc7157 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Fri, 8 Aug 2025 15:21:27 -0700 Subject: [PATCH 3/9] forgot to fetch --- devops/actions/run-tests/benchmark/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index 47048d96f8d6f..c6cbcbd7d2188 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -115,7 +115,8 @@ runs: cd ur git sparse-checkout init git sparse-checkout set unified-runtime - git checkout ${{ inputs.build_ref }} + git fetch origin ${{ inputs.build_ref }} + git checkout FETCH_HEAD # Configure UR mkdir build install From 7aaceb9d4c5567c7fed00ac4e5a44e261e1015dd Mon Sep 17 00:00:00 2001 From: Ian Li Date: Fri, 8 Aug 2025 15:24:04 -0700 Subject: [PATCH 4/9] do not install --- devops/actions/run-tests/benchmark/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index c6cbcbd7d2188..80421b1509bb9 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -119,7 +119,7 @@ runs: git checkout FETCH_HEAD # Configure UR - mkdir build install + mkdir build cmake -DCMAKE_BUILD_TYPE=Release \ -Sunified-runtime \ -Bbuild \ @@ -129,7 +129,6 @@ runs: # Build UR cmake --build build -j "$(nproc)" - cmake --install install - name: Checkout results repo shell: bash run: | From 1756604f146526bc7db0ce7ca4e3e9b43c7b596e Mon Sep 17 00:00:00 2001 From: Ian Li Date: Fri, 8 Aug 2025 17:48:44 -0700 Subject: [PATCH 5/9] install again --- devops/actions/run-tests/benchmark/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index 80421b1509bb9..c02f4470de83c 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -119,16 +119,18 @@ runs: git checkout FETCH_HEAD # Configure UR - mkdir build + 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 UR + # Build and install UR cmake --build build -j "$(nproc)" + cmake --install build - name: Checkout results repo shell: bash run: | From 8a009cdc3f2e33f9e1802ea2d5ff1c0d4899fa06 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Mon, 11 Aug 2025 08:19:59 -0700 Subject: [PATCH 6/9] install lit --- devops/actions/run-tests/benchmark/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index c02f4470de83c..0e15f50d6d23a 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -118,6 +118,9 @@ runs: git fetch origin ${{ inputs.build_ref }} git checkout FETCH_HEAD + # UR requires lit + pip install --user --break-system-packages lit + # Configure UR mkdir build install cmake -DCMAKE_BUILD_TYPE=Release \ From e9141dfd88fec9d0f2ee2a9e611c51e1e2064f73 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Mon, 11 Aug 2025 08:52:10 -0700 Subject: [PATCH 7/9] add lit to path --- devops/actions/run-tests/benchmark/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index 0e15f50d6d23a..f7c23bd140092 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -117,9 +117,13 @@ runs: git sparse-checkout set unified-runtime git fetch origin ${{ inputs.build_ref }} git checkout FETCH_HEAD - - # UR requires lit + + # UR requires lit; the SYCL toolchain does not package lit. Thus we + # install from pip: pip install --user --break-system-packages lit + # Add pip binaries dir to PATH + old_path="$PATH" + PATH="$HOME/.local/bin:$PATH" # Configure UR mkdir build install @@ -134,6 +138,8 @@ runs: # Build and install UR cmake --build build -j "$(nproc)" cmake --install build + + PATH="$old_path" - name: Checkout results repo shell: bash run: | From 1b9363101d75d6daa30b81510b88240466d28463 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Mon, 11 Aug 2025 09:14:28 -0700 Subject: [PATCH 8/9] fix bug --- devops/actions/run-tests/benchmark/action.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index f7c23bd140092..dd8ba29192c2e 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -118,19 +118,19 @@ runs: git fetch origin ${{ inputs.build_ref }} git checkout FETCH_HEAD - # UR requires lit; the SYCL toolchain does not package lit. Thus we - # install from pip: - pip install --user --break-system-packages lit - # Add pip binaries dir to PATH - old_path="$PATH" - PATH="$HOME/.local/bin:$PATH" + # # UR requires lit; the SYCL toolchain does not package lit. Thus we + # # install from pip: + # pip install --user --break-system-packages lit + # # Add pip binaries dir to PATH + # old_path="$PATH" + # PATH="$HOME/.local/bin:$PATH" # Configure UR mkdir build install cmake -DCMAKE_BUILD_TYPE=Release \ -Sunified-runtime \ -Bbuild \ - -DCMAKE_INSTALL_PREFIX=install + -DCMAKE_INSTALL_PREFIX=install \ -DUR_BUILD_TESTS=OFF \ -DUR_BUILD_ADAPTER_L0=ON \ -DUR_BUILD_ADAPTER_L0_V2=ON @@ -139,7 +139,9 @@ runs: cmake --build build -j "$(nproc)" cmake --install build - PATH="$old_path" + cd - + + #PATH="$old_path" - name: Checkout results repo shell: bash run: | From 9bd3a63a545d0f03d60b171016a15813755f1d74 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Mon, 11 Aug 2025 12:06:30 -0700 Subject: [PATCH 9/9] remove unecessary --- devops/actions/run-tests/benchmark/action.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index dd8ba29192c2e..7a202515862b5 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -118,13 +118,6 @@ runs: git fetch origin ${{ inputs.build_ref }} git checkout FETCH_HEAD - # # UR requires lit; the SYCL toolchain does not package lit. Thus we - # # install from pip: - # pip install --user --break-system-packages lit - # # Add pip binaries dir to PATH - # old_path="$PATH" - # PATH="$HOME/.local/bin:$PATH" - # Configure UR mkdir build install cmake -DCMAKE_BUILD_TYPE=Release \ @@ -140,8 +133,6 @@ runs: cmake --install build cd - - - #PATH="$old_path" - name: Checkout results repo shell: bash run: |