-
Notifications
You must be signed in to change notification settings - Fork 792
[CI] Add precompiled CTS tests to sycl_prebuilt_tests image #20332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Changes from all commits
7c9de76
026ba62
7fb4a3e
96d5ea7
ad2da94
3453107
874bc9d
2c0f0e6
64d2eae
3f27ea4
7f6bcc3
89faa52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
Comment on lines
+347
to
+348
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you can outline those changes into a separate PR, that would be awesome. |
||
target_devices: ${{ inputs.target_devices }} | ||
retention-days: ${{ inputs.retention-days }} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
# 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: | ||
|
@@ -35,6 +47,12 @@ jobs: | |
toolchain_artifact: toolchain | ||
toolchain_artifact_filename: toolchain.tar.zst | ||
e2e_binaries_artifact: e2e_bin | ||
cts_binaries_artifact: cts_bin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also contain the cache. I think it should be something like this:
|
||
# Author: Tom Deakin <[email protected]> | ||
# 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. | ||
|
@@ -72,7 +90,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 +138,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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,43 +4,45 @@ inputs: | |
ref: | ||
description: "Commit SHA or branch to checkout tests" | ||
required: true | ||
binaries_artifact: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW there is also windows/run-tests/cts/action.yml. Could you please update variables here as well & therefore sycl-windows-run-tests.yml (also maybe worth moving cts & e2e dirs to linux dir to align these things)? |
||
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 | ||
repository: 'KhronosGroup/SYCL-CTS' | ||
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 }} | ||
run: | | ||
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.binaries_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.binaries_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/bin | ||
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, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious - why do we need this
sycl_compiler
?