From 1379bb6680abbac1f95f855d95dd7ffe54bce0de Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Fri, 17 Oct 2025 22:28:11 +0200 Subject: [PATCH 1/2] [CI] Add sycl toolchain to PATH when building E2E tests --- .github/workflows/sycl-linux-build.yml | 6 +++--- .github/workflows/sycl-linux-precommit.yml | 2 +- devops/actions/run-tests/e2e/action.yml | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 923cf43da194f..5f56be76e2d7b 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -345,7 +345,7 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_artifact }} - sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd" - name: Remove E2E tests before spirv-backend run @@ -360,7 +360,7 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }} - sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param spirv-backend=True - name: Remove E2E tests before preview-mode run @@ -375,5 +375,5 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }} - sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param test-preview-mode=True diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 12986e98617fc..258560c422e02 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -94,7 +94,7 @@ jobs: ref: ${{ inputs.ref || github.sha }} testing_mode: full target_devices: native_cpu:cpu - sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param sycl_build_targets="native_cpu" extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON diff --git a/devops/actions/run-tests/e2e/action.yml b/devops/actions/run-tests/e2e/action.yml index 450ea7865b99a..6f6d09a43ff37 100644 --- a/devops/actions/run-tests/e2e/action.yml +++ b/devops/actions/run-tests/e2e/action.yml @@ -19,7 +19,7 @@ inputs: required: false retention-days: required: false - sycl_compiler: + sycl_toolchain: required: false runs: @@ -76,11 +76,28 @@ runs: if [ -n "$CMAKE_EXTRA_ARGS" ]; then echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT fi + + # Installing SYCL toolchain so that E2E tests pick up latest + # binaries (like sycl-post-link) while building instead of using + # system installed ones. + - name: Install SYCL toolchain + if: | + inputs.sycl_toolchain != '' && + inputs.testing_mode != 'run-only' + shell: bash + env: + SYCL_TOOLCHAIN: ${{ inputs.sycl_toolchain }} + run: | + echo "PATH=$SYCL_TOOLCHAIN/bin/:$PATH" >> $GITHUB_ENV + which clang++ + which sycl-ls + which sycl-post-link + - name: Configure E2E tests if: inputs.testing_mode != 'run-only' shell: bash run: | - cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }} + cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ '$(which clang++)' }}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }} - name: SYCL End-to-end tests id: run_e2e continue-on-error: true From f580da61d173023ebfa8ee247460278839a47a73 Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Fri, 17 Oct 2025 22:59:07 +0200 Subject: [PATCH 2/2] Use sycl-compiler as well --- .github/workflows/sycl-linux-build.yml | 3 +++ .github/workflows/sycl-linux-precommit.yml | 1 + devops/actions/run-tests/e2e/action.yml | 11 +++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 5f56be76e2d7b..0ee18b8029ff1 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -345,6 +345,7 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_artifact }} + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd" @@ -360,6 +361,7 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_spirv_backend_artifact }} + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param spirv-backend=True @@ -375,5 +377,6 @@ jobs: testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }} + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param test-preview-mode=True diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 258560c422e02..0cb973675008d 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -94,6 +94,7 @@ jobs: ref: ${{ inputs.ref || github.sha }} testing_mode: full target_devices: native_cpu:cpu + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ sycl_toolchain: $GITHUB_WORKSPACE/toolchain/ extra_lit_opts: --param sycl_build_targets="native_cpu" extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON diff --git a/devops/actions/run-tests/e2e/action.yml b/devops/actions/run-tests/e2e/action.yml index 6f6d09a43ff37..e97fcd8e877fe 100644 --- a/devops/actions/run-tests/e2e/action.yml +++ b/devops/actions/run-tests/e2e/action.yml @@ -19,6 +19,8 @@ inputs: required: false retention-days: required: false + sycl_compiler: + required: false sycl_toolchain: required: false @@ -82,22 +84,19 @@ runs: # system installed ones. - name: Install SYCL toolchain if: | - inputs.sycl_toolchain != '' && - inputs.testing_mode != 'run-only' + (inputs.sycl_toolchain != '' && + inputs.testing_mode != 'run-only') shell: bash env: SYCL_TOOLCHAIN: ${{ inputs.sycl_toolchain }} run: | echo "PATH=$SYCL_TOOLCHAIN/bin/:$PATH" >> $GITHUB_ENV - which clang++ - which sycl-ls - which sycl-post-link - name: Configure E2E tests if: inputs.testing_mode != 'run-only' shell: bash run: | - cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ '$(which clang++)' }}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }} + cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }} - name: SYCL End-to-end tests id: run_e2e continue-on-error: true