Skip to content

Commit

Permalink
[CI] Improve SYCL-CTS job
Browse files Browse the repository at this point in the history
1. Extend the number of suites.
2. Add the ability to define ninja's extra args for build-cts.
3. Keep executing the loop if suite fails.
  • Loading branch information
KornevNikita committed Mar 6, 2024
1 parent 3bb5f40 commit 7d9efb8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ on:
if inputs.target_devices contains 'ext_oneapi_hip'
type: string
required: False
ninja_build_cts_extra_args:
type: string
required: False
tests_selector:
description: |
Two possible options: "e2e" and "cts".
Expand Down Expand Up @@ -104,6 +107,8 @@ on:
- 'opencl:fpga'
- 'ext_oneapi_level_zero:gpu'
- 'ext_oneapi_hip:gpu'
ninja_build_cts_extra_args:
type: string
tests_selector:
type: choice
options:
Expand Down Expand Up @@ -278,6 +283,7 @@ jobs:
if: inputs.tests_selector == 'cts'
env:
CMAKE_EXTRA_ARGS: ${{ inputs.extra_cmake_args }}
NINJA_BUILD_CTS_EXTRA_ARGS: ${{ inputs.ninja_build_cts_extra_args }}
run: |
cmake -GNinja -B./build-cts -S./khronos_sycl_cts -DCMAKE_CXX_COMPILER=$(which clang++) \
-DSYCL_IMPLEMENTATION=DPCPP \
Expand All @@ -286,7 +292,7 @@ jobs:
-DSYCL_CTS_MEASURE_BUILD_TIMES=ON \
-DDPCPP_INSTALL_DIR="$$(dirname (which clang++))/.." \
$CMAKE_EXTRA_ARGS
ninja -C build-cts
ninja -C build-cts $NINJA_BUILD_CTS_EXTRA_ARGS
- name: SYCL CTS List devices
if: inputs.tests_selector == 'cts'
Expand All @@ -297,17 +303,39 @@ jobs:
if: inputs.tests_selector == 'cts'
env:
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
# By-default GitHub actions execute the "run" shell script with -e option,
# so the execution terminates if any command returns a non-zero status.
# Since we're using a loop to run all test-binaries separately, some test
# may fail and terminate the execution. Setting "shell" value to override
# the default behavior.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell
shell: bash {0}
# FIXME: For some reason the "sub_group api" test-case is failing with
# SIGSEGV while running test_all, so running each binary separately.
# BTW test_all requires a lot of resources to build it, so probably it'll
# be better to build each binary also separately.
# run: |
# ./build-cts/bin/test_all $CTS_TEST_ARGS
run: |
status=""
failed_suites=""
for i in `ls -1 ./build-cts/bin`; do
if [ "$i" != "test_all" ]; then
echo "::group::Running $i"
build-cts/bin/$i
if [ $? -ne 0 ]; then
status=1
if [$failed_suites == ""]; then
failed_suites=$i
else
failed_suites="$failed_suites, $i"
fi
fi
echo "::endgroup::"
fi
done
if [ -n "$status" ]; then
echo "Failed suite(s): $failed_suites"
exit 1
fi
exit 0
1 change: 1 addition & 0 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: opencl:cpu
tests_selector: cts
ninja_build_cts_extra_args: '-j8'
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }}
Expand Down
28 changes: 0 additions & 28 deletions devops/cts_exclude_filter
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
context
device
event
exceptions
kernel
multi_ptr
platform
queue
reduction
optional_kernel_features
accessor
accessor_legacy
vector_alias
vector_api
vector_constructors
vector_load_store
vector_operators
vector_swizzle_assignment
vector_swizzles
kernel_bundle
spec_constants
device_selector
math_builtin_api
stream
marray
image_accessor
atomic_fence
function_objects
group_functions
image
atomic_ref

0 comments on commit 7d9efb8

Please sign in to comment.