From 7c9de76b00c8904febf7f347fb8a7a02a1fd54b6 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Tue, 7 Oct 2025 15:24:01 -0700 Subject: [PATCH 01/22] add cts container --- .github/workflows/sycl-linux-build.yml | 14 +++++ .github/workflows/sycl-linux-run-tests.yml | 4 +- .../workflows/sycl-prebuilt-e2e-container.yml | 34 +++++++++++- devops/actions/run-tests/cts/action.yml | 55 +++++++++++++------ 4 files changed, 87 insertions(+), 20 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 923cf43da194f..e478eedbdfb3a 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -76,6 +76,10 @@ on: type: string required: false + cts_binaries_artifact: + type: string + required: false + outputs: build_conclusion: value: ${{ jobs.build.outputs.build_conclusion }} @@ -337,6 +341,16 @@ jobs: comm -13 env_before env_after >> $GITHUB_ENV rm env_before env_after + - name: Build CTS tests + if: ${{ inputs.cts_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }} + uses: ./devops/actions/run-tests/cts + with: + ref: ${{ inputs.ref || github.sha }} + testing_mode: build-only + target_devices: all + binaries_artifact: ${{ inputs.cts_binaries_artifact }} + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + - name: Build E2E tests if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }} uses: ./devops/actions/run-tests/e2e diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index de81af128d58d..d09281c716341 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -344,8 +344,8 @@ jobs: with: ref: ${{ inputs.tests_ref || 'main' }} extra_cmake_args: ${{ inputs.extra_cmake_args }} - cts_testing_mode: ${{ inputs.cts_testing_mode }} - sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }} + testing_mode: ${{ inputs.cts_testing_mode }} + binaries_artifact: ${{ inputs.sycl_cts_artifact }} target_devices: ${{ inputs.target_devices }} retention-days: ${{ inputs.retention-days }} diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 3932c796180ec..6f73ef273b03c 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -35,6 +35,7 @@ jobs: toolchain_artifact: toolchain toolchain_artifact_filename: toolchain.tar.zst e2e_binaries_artifact: e2e_bin + cts_binaries_artifact: cts_bin # Couldn't make it work from inside the container, so have to use an extra job # and pass an artifact. @@ -72,7 +73,11 @@ jobs: with: name: e2e_bin path: devops/ - + - name: Download CTS binaries + uses: actions/download-artifact@v5 + with: + name: cts_bin + path: devops/ - name: Build container uses: ./devops/actions/build_container @@ -116,3 +121,30 @@ jobs: with: testing_mode: run-only target_devices: level_zero:gpu + + run-cts: + name: Run CTS tests with SYCL RT they were built with + runs-on: [Linux, pvc] + needs: [docker, build] + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + container: + image: ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }} + options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + steps: + - uses: actions/checkout@v5 + with: + sparse-checkout: | + devops + - run: | + mkdir toolchain + tar -I 'zstd' -xf /sycl-prebuilt/toolchain.tar.zst -C toolchain + echo LD_LIBRARY_PATH=$PWD/toolchain/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV + echo PATH=$PWD/toolchain/bin:$PATH >> $GITHUB_ENV + - run: | + sycl-ls + - name: Run CTS tests + uses: ./devops/actions/run-tests/cts + timeout-minutes: 20 + with: + testing_mode: run-only + target_devices: level_zero:gpu diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index d5c865d208b34..715bf2c92c034 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -4,22 +4,24 @@ inputs: ref: description: "Commit SHA or branch to checkout tests" required: true + binaries_artifact: + required: false extra_cmake_args: required: false - cts_testing_mode: + testing_mode: required: true - sycl_cts_artifact: - require: false target_devices: required: true retention-days: required: false + sycl_compiler: + required: false runs: using: "composite" steps: - name: Checkout SYCL CTS tests - if: inputs.cts_testing_mode != 'run-only' + if: inputs.testing_mode != 'run-only' uses: ./devops/actions/cached_checkout with: path: khronos_sycl_cts @@ -27,12 +29,12 @@ runs: ref: ${{ inputs.ref }} cache_path: "/__w/repo_cache/" - name: SYCL CTS GIT submodules init - if: inputs.cts_testing_mode != 'run-only' + if: inputs.testing_mode != 'run-only' shell: bash run: | git -C khronos_sycl_cts submodule update --init - name: Build SYCL CTS tests - if: inputs.cts_testing_mode != 'run-only' + if: inputs.testing_mode != 'run-only' shell: bash env: CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }} @@ -40,7 +42,7 @@ runs: cts_exclude_filter="" # If CTS_TESTS_TO_BUILD is null - use filter if [ -z "$CTS_TESTS_TO_BUILD" ]; then - if [ "${{ contains(inputs.cts_testing_mode, 'build-only') }}" = "true" ]; then + if [ "${{ contains(inputs.testing_mode, 'build-only') }}" = "true" ]; then cts_exclude_filter=$PWD/sycl/cts_exclude_filter/compfails elif [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then cts_exclude_filter=$PWD/sycl/cts_exclude_filter/LINUX_OCL_CPU @@ -56,7 +58,7 @@ runs: echo "::endgroup::" fi - cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER=$(which clang++) \ + cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" \ -DSYCL_IMPLEMENTATION=DPCPP \ -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$cts_exclude_filter" \ -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \ @@ -68,34 +70,53 @@ runs: ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance") - name: Pack SYCL-CTS binaries - if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only' + if: always() && !cancelled() && inputs.testing_mode == 'build-only' shell: bash run: tar -I 'zstd -9' -cf sycl_cts_bin.tar.zst -C ./build-cts/bin . - name: Upload SYCL-CTS binaries - if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only' + if: always() && !cancelled() && inputs.testing_mode == 'build-only' uses: actions/upload-artifact@v4 with: - name: ${{ inputs.sycl_cts_artifact }} + name: ${{ inputs.binary_artifact }} path: sycl_cts_bin.tar.zst retention-days: ${{ inputs.retention-days }} - name: Download SYCL-CTS binaries - if: inputs.cts_testing_mode == 'run-only' + if: | + inputs.testing_mode == 'run-only' + && !(inputs.binaries_artifact == 'in-container' + || inputs.binaries_artifact == '' + || github.event_name == 'workflow_dispatch') uses: actions/download-artifact@v4 with: - name: ${{ inputs.sycl_cts_artifact }} + name: ${{ inputs.binary_artifact }} - name: Extract SYCL-CTS binaries - if: inputs.cts_testing_mode == 'run-only' + if: | + inputs.testing_mode == 'run-only' + && !(inputs.binaries_artifact == 'in-container' + || inputs.binaries_artifact == '' + || github.event_name == 'workflow_dispatch') shell: bash run: | mkdir -p build-cts/bin tar -I 'zstd' -xf sycl_cts_bin.tar.zst -C build-cts/bin + - name: Extract CTS tests from container image + if: | + inputs.testing_mode == 'run-only' + && (inputs.binaries_artifact == 'in-container' + || inputs.binaries_artifact == '' + || github.event_name == 'workflow_dispatch') + shell: bash + run: | + mkdir -p build-cts llvm + tar -I 'zstd' -xf /sycl-prebuilt/sycl_cts_bin.tar.zst -C build-cts/bin + - name: SYCL CTS List devices # Proceed with execution even if the 'build' step did not succeed. - if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' + if: (always() && !cancelled()) && inputs.testing_mode != 'build-only' shell: bash env: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} @@ -109,7 +130,7 @@ runs: # these files may differ from each other, so when there is a pre-built set of # tests, we need to filter it according to the filter-file. - name: Filter SYCL CTS test categories - if: inputs.cts_testing_mode == 'run-only' + if: inputs.testing_mode == 'run-only' shell: bash run: | cts_exclude_filter="" @@ -129,7 +150,7 @@ runs: - name: Run SYCL CTS tests # Proceed with execution even if the previous two steps did not succeed. - if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' + if: (always() && !cancelled()) && inputs.testing_mode != 'build-only' env: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} # By-default GitHub actions execute the "run" shell script with -e option, From 026ba62a4f439f8de9a827287671a1df45fb61fb Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 12:06:40 -0700 Subject: [PATCH 02/22] remove need to fill in ref --- .github/workflows/sycl-prebuilt-e2e-container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 6f73ef273b03c..82190db1b0cc4 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -10,7 +10,7 @@ on: ref: type: string description: tag/sha - required: true + required: false default: push: From 7fb4a3e8036336066576919d50b0b38656c83242 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 13:02:57 -0700 Subject: [PATCH 03/22] use main cts branch --- .github/workflows/sycl-linux-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index e478eedbdfb3a..d08fdd28c0c2b 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -345,7 +345,7 @@ jobs: if: ${{ inputs.cts_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }} uses: ./devops/actions/run-tests/cts with: - ref: ${{ inputs.ref || github.sha }} + ref: main testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.cts_binaries_artifact }} From 96d5ea7f011340be1441113474c5ae54acba4eb9 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 13:21:24 -0700 Subject: [PATCH 04/22] use hardcoded commit from now --- .github/workflows/sycl-linux-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index d08fdd28c0c2b..08bcfef3c21d7 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -345,7 +345,11 @@ jobs: if: ${{ inputs.cts_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }} uses: ./devops/actions/run-tests/cts with: - ref: main + # Author: Tom Deakin + # Date: Thu Jul 10 16:45:48 2025 +0100 + # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions + # Remove expected exceptions for secondary queue + ref: 19e4ed34377c8a8a354d701772427be8c5430b0d testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.cts_binaries_artifact }} From ad2da940d2fc4826ae1322bceb217658b7bf7eb4 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 13:49:56 -0700 Subject: [PATCH 05/22] test --- devops/actions/run-tests/cts/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index 715bf2c92c034..843e4943c9503 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -39,6 +39,7 @@ runs: env: CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }} run: | + find . -maxdepth 3 cts_exclude_filter="" # If CTS_TESTS_TO_BUILD is null - use filter if [ -z "$CTS_TESTS_TO_BUILD" ]; then @@ -58,6 +59,8 @@ runs: echo "::endgroup::" fi + cat $cts_exclude_filter + cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" \ -DSYCL_IMPLEMENTATION=DPCPP \ -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$cts_exclude_filter" \ From 34531078ddbfb715179b4210283136f7a7124f6f Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 14:45:01 -0700 Subject: [PATCH 06/22] move cloning exclude filters out of sycl-linux-run-tests --- .github/workflows/sycl-linux-run-tests.yml | 1 - devops/actions/run-tests/cts/action.yml | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index d09281c716341..dcae64eda222c 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -229,7 +229,6 @@ jobs: with: sparse-checkout: | devops - sycl/cts_exclude_filter - name: Register cleanup after job is finished uses: ./devops/actions/cleanup - name: Reset Intel GPU diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index 843e4943c9503..ce6ca31907b08 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -20,6 +20,12 @@ inputs: runs: using: "composite" steps: + - name: Checkout CTS exclude filters + if: inputs.testing_mode != 'run-only' + uses: actions/checkout@v5 + with: + sparse-checkout: | + sycl/cts_exclude_filter - name: Checkout SYCL CTS tests if: inputs.testing_mode != 'run-only' uses: ./devops/actions/cached_checkout From 874bc9d8e142ce4c7bd8105601788b556c8e5268 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 15:02:36 -0700 Subject: [PATCH 07/22] actions/checkout sucks --- .github/workflows/sycl-linux-build.yml | 1 + .github/workflows/sycl-linux-run-tests.yml | 1 + devops/actions/run-tests/cts/action.yml | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 08bcfef3c21d7..f62581ab982d1 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -177,6 +177,7 @@ jobs: with: sparse-checkout: | devops/actions + sycl/cts_exclude_filter # Cleanup will be run after all actions are completed. - name: Register cleanup after job is finished uses: ./devops/actions/cleanup diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index dcae64eda222c..d09281c716341 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -229,6 +229,7 @@ jobs: with: sparse-checkout: | devops + sycl/cts_exclude_filter - name: Register cleanup after job is finished uses: ./devops/actions/cleanup - name: Reset Intel GPU diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index ce6ca31907b08..843e4943c9503 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -20,12 +20,6 @@ inputs: runs: using: "composite" steps: - - name: Checkout CTS exclude filters - if: inputs.testing_mode != 'run-only' - uses: actions/checkout@v5 - with: - sparse-checkout: | - sycl/cts_exclude_filter - name: Checkout SYCL CTS tests if: inputs.testing_mode != 'run-only' uses: ./devops/actions/cached_checkout From 2c0f0e62bec640fd0e27d487ff7268ea51c4d51d Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 8 Oct 2025 15:34:26 -0700 Subject: [PATCH 08/22] typo --- devops/actions/run-tests/cts/action.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index 843e4943c9503..30af36b0dd60a 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -39,7 +39,6 @@ runs: env: CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }} run: | - find . -maxdepth 3 cts_exclude_filter="" # If CTS_TESTS_TO_BUILD is null - use filter if [ -z "$CTS_TESTS_TO_BUILD" ]; then @@ -59,8 +58,6 @@ runs: echo "::endgroup::" fi - cat $cts_exclude_filter - cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" \ -DSYCL_IMPLEMENTATION=DPCPP \ -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$cts_exclude_filter" \ @@ -81,7 +78,7 @@ runs: if: always() && !cancelled() && inputs.testing_mode == 'build-only' uses: actions/upload-artifact@v4 with: - name: ${{ inputs.binary_artifact }} + name: ${{ inputs.binaries_artifact }} path: sycl_cts_bin.tar.zst retention-days: ${{ inputs.retention-days }} @@ -93,7 +90,7 @@ runs: || github.event_name == 'workflow_dispatch') uses: actions/download-artifact@v4 with: - name: ${{ inputs.binary_artifact }} + name: ${{ inputs.binaries_artifact }} - name: Extract SYCL-CTS binaries if: | From 64d2eae7efe3f396ded70599010f8aa4c644ca79 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 9 Oct 2025 09:37:24 -0700 Subject: [PATCH 09/22] update docker image --- devops/containers/release_tests_binaries.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devops/containers/release_tests_binaries.Dockerfile b/devops/containers/release_tests_binaries.Dockerfile index 5c6e32718168a..000e43f911bf5 100644 --- a/devops/containers/release_tests_binaries.Dockerfile +++ b/devops/containers/release_tests_binaries.Dockerfile @@ -16,11 +16,13 @@ FROM $base_image:$base_tag ADD --chown=sycl:sycl toolchain.tar.zst /__w/llvm/llvm/toolchain ADD --chown=sycl:sycl e2e_binaries.tar.zst /__w/llvm/llvm/build-e2e ADD --chown=sycl:sycl e2e_sources.tar.zst /__w/llvm/llvm/llvm +ADD --chown=sycl:sycl sycl_cts_bin.tar.zst /__w/llvm/llvm/build-cts # Since `/__w/llvm/llvm` above is overriden by GHA, need to provide the # following for using in CI: COPY e2e_binaries.tar.zst /sycl-prebuilt/ COPY e2e_sources.tar.zst /sycl-prebuilt/ +COPY sycl_cts_bin.tar.zst /sycl-prebuilt/ COPY toolchain.tar.zst /sycl-prebuilt/ COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh From 3f27ea4db519b955b278f9b72bfd95e9206a1d31 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 9 Oct 2025 12:02:48 -0700 Subject: [PATCH 10/22] fix bug --- devops/actions/run-tests/cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index 30af36b0dd60a..81894fd6dab95 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -111,7 +111,7 @@ runs: || github.event_name == 'workflow_dispatch') shell: bash run: | - mkdir -p build-cts llvm + mkdir -p build-cts/bin tar -I 'zstd' -xf /sycl-prebuilt/sycl_cts_bin.tar.zst -C build-cts/bin - name: SYCL CTS List devices From 7f6bcc3020917b088794edce1130edd1e0b39b4f Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 9 Oct 2025 12:41:08 -0700 Subject: [PATCH 11/22] undo change --- .github/workflows/sycl-prebuilt-e2e-container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 82190db1b0cc4..6f73ef273b03c 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -10,7 +10,7 @@ on: ref: type: string description: tag/sha - required: false + required: true default: push: From 89faa52570366471bc5a7026737e5638c7dce405 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 9 Oct 2025 16:43:06 -0700 Subject: [PATCH 12/22] add option to input cts refs --- .github/workflows/sycl-linux-build.yml | 10 +++++----- .../workflows/sycl-prebuilt-e2e-container.yml | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index f62581ab982d1..f2e96e064b8fb 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -79,6 +79,10 @@ on: cts_binaries_artifact: type: string required: false + cts_binaries_ref: + type: string + description: tag/ref of CTS tests to compile + default: main outputs: build_conclusion: @@ -346,11 +350,7 @@ jobs: if: ${{ inputs.cts_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }} uses: ./devops/actions/run-tests/cts with: - # Author: Tom Deakin - # Date: Thu Jul 10 16:45:48 2025 +0100 - # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions - # Remove expected exceptions for secondary queue - ref: 19e4ed34377c8a8a354d701772427be8c5430b0d + ref: ${{ inputs.cts_binaries_ref }} testing_mode: build-only target_devices: all binaries_artifact: ${{ inputs.cts_binaries_artifact }} diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 6f73ef273b03c..9cd0e6a14b1f0 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -12,6 +12,18 @@ on: description: tag/sha required: true default: + cts_ref: + type: choice + description: tag/sha to use for CTS -- hardcoded hash is last known good commit. + required: true + default: 'main' + options: + - main + # Author: Tom Deakin + # Date: Thu Jul 10 16:45:48 2025 +0100 + # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions + # Remove expected exceptions for secondary queue + - 19e4ed34377c8a8a354d701772427be8c5430b0d push: branches: @@ -36,6 +48,11 @@ jobs: toolchain_artifact_filename: toolchain.tar.zst e2e_binaries_artifact: e2e_bin cts_binaries_artifact: cts_bin + # Author: Tom Deakin + # Date: Thu Jul 10 16:45:48 2025 +0100 + # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions + # Remove expected exceptions for secondary queue + cts_binaries_ref: ${{ github.event_name == 'push' && 19e4ed34377c8a8a354d701772427be8c5430b0d || inputs.cts_ref }} # Couldn't make it work from inside the container, so have to use an extra job # and pass an artifact. From d2d243f05b0d8174bb6ab2e86160628871dfb99d Mon Sep 17 00:00:00 2001 From: Ian Li Date: Tue, 14 Oct 2025 11:58:25 -0700 Subject: [PATCH 13/22] revert renaming --- .github/workflows/sycl-linux-build.yml | 4 +- .github/workflows/sycl-linux-run-tests.yml | 4 +- .../workflows/sycl-prebuilt-e2e-container.yml | 2 +- devops/actions/run-tests/cts/action.yml | 46 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index f2e96e064b8fb..e44158d7105cf 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -351,9 +351,9 @@ jobs: uses: ./devops/actions/run-tests/cts with: ref: ${{ inputs.cts_binaries_ref }} - testing_mode: build-only + cts_testing_mode: build-only target_devices: all - binaries_artifact: ${{ inputs.cts_binaries_artifact }} + sycl_cts_artifact: ${{ inputs.cts_binaries_artifact }} sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ - name: Build E2E tests diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index d09281c716341..de81af128d58d 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -344,8 +344,8 @@ jobs: with: ref: ${{ inputs.tests_ref || 'main' }} extra_cmake_args: ${{ inputs.extra_cmake_args }} - testing_mode: ${{ inputs.cts_testing_mode }} - binaries_artifact: ${{ inputs.sycl_cts_artifact }} + cts_testing_mode: ${{ inputs.cts_testing_mode }} + sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }} target_devices: ${{ inputs.target_devices }} retention-days: ${{ inputs.retention-days }} diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 9cd0e6a14b1f0..d5ba26ffe11e8 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -163,5 +163,5 @@ jobs: uses: ./devops/actions/run-tests/cts timeout-minutes: 20 with: - testing_mode: run-only + cts_testing_mode: run-only target_devices: level_zero:gpu diff --git a/devops/actions/run-tests/cts/action.yml b/devops/actions/run-tests/cts/action.yml index 81894fd6dab95..56dce850168dd 100644 --- a/devops/actions/run-tests/cts/action.yml +++ b/devops/actions/run-tests/cts/action.yml @@ -4,12 +4,12 @@ inputs: ref: description: "Commit SHA or branch to checkout tests" required: true - binaries_artifact: - required: false extra_cmake_args: required: false - testing_mode: + cts_testing_mode: required: true + sycl_cts_artifact: + required: false target_devices: required: true retention-days: @@ -21,7 +21,7 @@ runs: using: "composite" steps: - name: Checkout SYCL CTS tests - if: inputs.testing_mode != 'run-only' + if: inputs.cts_testing_mode != 'run-only' uses: ./devops/actions/cached_checkout with: path: khronos_sycl_cts @@ -29,12 +29,12 @@ runs: ref: ${{ inputs.ref }} cache_path: "/__w/repo_cache/" - name: SYCL CTS GIT submodules init - if: inputs.testing_mode != 'run-only' + if: inputs.cts_testing_mode != 'run-only' shell: bash run: | git -C khronos_sycl_cts submodule update --init - name: Build SYCL CTS tests - if: inputs.testing_mode != 'run-only' + if: inputs.cts_testing_mode != 'run-only' shell: bash env: CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }} @@ -42,7 +42,7 @@ runs: cts_exclude_filter="" # If CTS_TESTS_TO_BUILD is null - use filter if [ -z "$CTS_TESTS_TO_BUILD" ]; then - if [ "${{ contains(inputs.testing_mode, 'build-only') }}" = "true" ]; then + if [ "${{ contains(inputs.cts_testing_mode, 'build-only') }}" = "true" ]; then cts_exclude_filter=$PWD/sycl/cts_exclude_filter/compfails elif [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then cts_exclude_filter=$PWD/sycl/cts_exclude_filter/LINUX_OCL_CPU @@ -70,33 +70,33 @@ runs: ninja -C build-cts -k0 $( [ -n "$CTS_TESTS_TO_BUILD" ] && echo "$CTS_TESTS_TO_BUILD" || echo "test_conformance") - name: Pack SYCL-CTS binaries - if: always() && !cancelled() && inputs.testing_mode == 'build-only' + if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only' shell: bash run: tar -I 'zstd -9' -cf sycl_cts_bin.tar.zst -C ./build-cts/bin . - name: Upload SYCL-CTS binaries - if: always() && !cancelled() && inputs.testing_mode == 'build-only' + if: always() && !cancelled() && inputs.cts_testing_mode == 'build-only' uses: actions/upload-artifact@v4 with: - name: ${{ inputs.binaries_artifact }} + name: ${{ inputs.sycl_cts_artifact }} path: sycl_cts_bin.tar.zst retention-days: ${{ inputs.retention-days }} - name: Download SYCL-CTS binaries if: | - inputs.testing_mode == 'run-only' - && !(inputs.binaries_artifact == 'in-container' - || inputs.binaries_artifact == '' + inputs.cts_testing_mode == 'run-only' + && !(inputs.sycl_cts_artifact == 'in-container' + || inputs.sycl_cts_artifact == '' || github.event_name == 'workflow_dispatch') uses: actions/download-artifact@v4 with: - name: ${{ inputs.binaries_artifact }} + name: ${{ inputs.sycl_cts_artifact }} - name: Extract SYCL-CTS binaries if: | - inputs.testing_mode == 'run-only' - && !(inputs.binaries_artifact == 'in-container' - || inputs.binaries_artifact == '' + inputs.cts_testing_mode == 'run-only' + && !(inputs.sycl_cts_artifact == 'in-container' + || inputs.sycl_cts_artifact == '' || github.event_name == 'workflow_dispatch') shell: bash run: | @@ -105,9 +105,9 @@ runs: - name: Extract CTS tests from container image if: | - inputs.testing_mode == 'run-only' - && (inputs.binaries_artifact == 'in-container' - || inputs.binaries_artifact == '' + inputs.cts_testing_mode == 'run-only' + && (inputs.sycl_cts_artifact == 'in-container' + || inputs.sycl_cts_artifact == '' || github.event_name == 'workflow_dispatch') shell: bash run: | @@ -116,7 +116,7 @@ runs: - name: SYCL CTS List devices # Proceed with execution even if the 'build' step did not succeed. - if: (always() && !cancelled()) && inputs.testing_mode != 'build-only' + if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' shell: bash env: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} @@ -130,7 +130,7 @@ runs: # these files may differ from each other, so when there is a pre-built set of # tests, we need to filter it according to the filter-file. - name: Filter SYCL CTS test categories - if: inputs.testing_mode == 'run-only' + if: inputs.cts_testing_mode == 'run-only' shell: bash run: | cts_exclude_filter="" @@ -150,7 +150,7 @@ runs: - name: Run SYCL CTS tests # Proceed with execution even if the previous two steps did not succeed. - if: (always() && !cancelled()) && inputs.testing_mode != 'build-only' + if: (always() && !cancelled()) && inputs.cts_testing_mode != 'build-only' env: ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }} # By-default GitHub actions execute the "run" shell script with -e option, From fccecfb16efd1851672756214174f7dfd1baa521 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Tue, 14 Oct 2025 12:05:15 -0700 Subject: [PATCH 14/22] fix typo --- .github/workflows/sycl-prebuilt-e2e-container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index d5ba26ffe11e8..4eb2b9aff72c6 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -52,7 +52,7 @@ jobs: # Date: Thu Jul 10 16:45:48 2025 +0100 # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions # Remove expected exceptions for secondary queue - cts_binaries_ref: ${{ github.event_name == 'push' && 19e4ed34377c8a8a354d701772427be8c5430b0d || inputs.cts_ref }} + cts_binaries_ref: ${{ github.event_name == 'push' && '19e4ed34377c8a8a354d701772427be8c5430b0d' || inputs.cts_ref }} # Couldn't make it work from inside the container, so have to use an extra job # and pass an artifact. From 6d9717b75ef18cae7f1d5c4f4875c88bf4901965 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Tue, 14 Oct 2025 13:52:10 -0700 Subject: [PATCH 15/22] amend comment --- .github/workflows/sycl-prebuilt-e2e-container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 4eb2b9aff72c6..ecfdbf92502c6 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -1,8 +1,8 @@ name: Create container with pre-built tests -# The purpose of this is to build E2E tests with the latest release toolchain -# and then run them with the trunk SYCL RT (libsycl.so and friends) to verify -# that ABI compatibility hasn't been broken. +# The purpose of this is to build E2E and CTS tests with the latest release +# toolchain and then run them with the trunk SYCL RT (libsycl.so and friends) +# to verify that ABI compatibility hasn't been broken. on: workflow_dispatch: From e74bc2c7146824c4b3c3fa0519aff306cbe9203d Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 15 Oct 2025 15:41:57 -0400 Subject: [PATCH 16/22] Update .github/workflows/sycl-prebuilt-e2e-container.yml Co-authored-by: Andrei Elovikov --- .github/workflows/sycl-prebuilt-e2e-container.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index ecfdbf92502c6..235063dcea0ba 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -19,6 +19,7 @@ on: default: 'main' options: - main + # Author: Tom Deakin # Date: Thu Jul 10 16:45:48 2025 +0100 # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions From 658294f9923442073bec228fa9f9b0a67b2126e2 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Wed, 15 Oct 2025 14:50:47 -0700 Subject: [PATCH 17/22] eliminate redundant job --- .../workflows/sycl-prebuilt-e2e-container.yml | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 235063dcea0ba..d14dc554973bc 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -19,7 +19,6 @@ on: default: 'main' options: - main - # Author: Tom Deakin # Date: Thu Jul 10 16:45:48 2025 +0100 # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions @@ -107,14 +106,14 @@ jobs: tags: | ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }} - run-e2e: + run-prebuilt-tests: # Ensure those tests can actually pass with the toolchain they were built # with, otherwise testing compatibility with those binaries is pointless. # This job should be aligned with how the image will be used in trunk CI. # # I'll start with just a single configuration, but this might be extended # with a matrix in future (e.g., to run on cpu/CUDA/AMDGPU). - name: Run E2E tests with SYCL RT they were built with + name: Run E2E, CTS tests with SYCL RT they were built with runs-on: [Linux, pvc] needs: [docker, build] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} @@ -139,27 +138,6 @@ jobs: with: testing_mode: run-only target_devices: level_zero:gpu - - run-cts: - name: Run CTS tests with SYCL RT they were built with - runs-on: [Linux, pvc] - needs: [docker, build] - if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - container: - image: ghcr.io/${{ github.repository }}/sycl_prebuilt_tests:${{ inputs.ref || github.ref_name }} - options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - steps: - - uses: actions/checkout@v5 - with: - sparse-checkout: | - devops - - run: | - mkdir toolchain - tar -I 'zstd' -xf /sycl-prebuilt/toolchain.tar.zst -C toolchain - echo LD_LIBRARY_PATH=$PWD/toolchain/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV - echo PATH=$PWD/toolchain/bin:$PATH >> $GITHUB_ENV - - run: | - sycl-ls - name: Run CTS tests uses: ./devops/actions/run-tests/cts timeout-minutes: 20 From d424a372dd9e9b8a9f366f3cf9c44a7a751d537a Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 16 Oct 2025 12:47:03 -0700 Subject: [PATCH 18/22] make sure cts/e2e always runs --- .github/workflows/sycl-prebuilt-e2e-container.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index d14dc554973bc..6c483ce47cac9 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -125,7 +125,8 @@ jobs: with: sparse-checkout: | devops - - run: | + - id: decompress + run: | mkdir toolchain tar -I 'zstd' -xf /sycl-prebuilt/toolchain.tar.zst -C toolchain echo LD_LIBRARY_PATH=$PWD/toolchain/lib:$LD_LIBRARY_PATH >> $GITHUB_ENV @@ -134,12 +135,14 @@ jobs: sycl-ls - name: Run E2E tests uses: ./devops/actions/run-tests/e2e + if: ${{ always() && !cancelled() && steps.decompress.outcome == 'success' }} timeout-minutes: 20 with: testing_mode: run-only target_devices: level_zero:gpu - name: Run CTS tests uses: ./devops/actions/run-tests/cts + if: ${{ always() && !cancelled() && steps.decompress.outcome == 'success' }} timeout-minutes: 20 with: cts_testing_mode: run-only From 0ae7546035a67f7a4cf7127c6f2d7ab13c16d40e Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 16 Oct 2025 12:54:12 -0700 Subject: [PATCH 19/22] change wording --- .github/workflows/sycl-prebuilt-e2e-container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index 6c483ce47cac9..e585c637c95b3 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -14,7 +14,7 @@ on: default: cts_ref: type: choice - description: tag/sha to use for CTS -- hardcoded hash is last known good commit. + description: tag/sha to use for SYCL-CTS -- hardcoded hash is last known commit to pass with latest release toolchain. required: true default: 'main' options: From 76c064238f5838f618b55908ca79f4d5eb616d51 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 16 Oct 2025 15:44:46 -0700 Subject: [PATCH 20/22] reword description --- .github/workflows/sycl-prebuilt-e2e-container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml index e585c637c95b3..dd067455241c8 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -14,7 +14,7 @@ on: default: cts_ref: type: choice - description: tag/sha to use for SYCL-CTS -- hardcoded hash is last known commit to pass with latest release toolchain. + description: tag/sha to use for SYCL-CTS -- hardcoded hash is CTS revision matching sycl-rel-N_M branch. required: true default: 'main' options: From fcfb2e922cc5aa02a3cc10150e5b141c74e98529 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 30 Oct 2025 15:21:35 -0700 Subject: [PATCH 21/22] rename file --- ...lt-e2e-container.yml => sycl-prebuilt-e2e-cts-container.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{sycl-prebuilt-e2e-container.yml => sycl-prebuilt-e2e-cts-container.yml} (99%) diff --git a/.github/workflows/sycl-prebuilt-e2e-container.yml b/.github/workflows/sycl-prebuilt-e2e-cts-container.yml similarity index 99% rename from .github/workflows/sycl-prebuilt-e2e-container.yml rename to .github/workflows/sycl-prebuilt-e2e-cts-container.yml index dd067455241c8..669a3d3a295c8 100644 --- a/.github/workflows/sycl-prebuilt-e2e-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-cts-container.yml @@ -14,7 +14,7 @@ on: default: cts_ref: type: choice - description: tag/sha to use for SYCL-CTS -- hardcoded hash is CTS revision matching sycl-rel-N_M branch. + description: tag/sha to use for SYCL-CTS -- hardcoded hash is CTS revision matching sycl-rel-6_3 branch. required: true default: 'main' options: From ec1d4d5807a4bf45ddeb28193dd4fd5d23af8a16 Mon Sep 17 00:00:00 2001 From: Ian Li Date: Thu, 30 Oct 2025 15:59:09 -0700 Subject: [PATCH 22/22] [test] simplify ternary logic --- ...lt-e2e-cts-container.yml => sycl-prebuilt-e2e-container.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{sycl-prebuilt-e2e-cts-container.yml => sycl-prebuilt-e2e-container.yml} (97%) diff --git a/.github/workflows/sycl-prebuilt-e2e-cts-container.yml b/.github/workflows/sycl-prebuilt-e2e-container.yml similarity index 97% rename from .github/workflows/sycl-prebuilt-e2e-cts-container.yml rename to .github/workflows/sycl-prebuilt-e2e-container.yml index 669a3d3a295c8..9801742b442b9 100644 --- a/.github/workflows/sycl-prebuilt-e2e-cts-container.yml +++ b/.github/workflows/sycl-prebuilt-e2e-container.yml @@ -52,7 +52,7 @@ jobs: # Date: Thu Jul 10 16:45:48 2025 +0100 # Merge pull request #1102 from steffenlarsen/steffen/remove_secondary_queue_exceptions # Remove expected exceptions for secondary queue - cts_binaries_ref: ${{ github.event_name == 'push' && '19e4ed34377c8a8a354d701772427be8c5430b0d' || inputs.cts_ref }} + cts_binaries_ref: ${{ inputs.cts_ref || '19e4ed34377c8a8a354d701772427be8c5430b0d' }} # Couldn't make it work from inside the container, so have to use an extra job # and pass an artifact.