From 36cd9776d52c98a1898f9b49445b7c41e462092a Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 21 May 2026 07:36:10 -0700 Subject: [PATCH 01/21] Add ProtoSYCL impl to CMake Signed-off-by: Michael Aziz --- CMakeLists.txt | 2 ++ cmake/AdaptProtoSYCL.cmake | 29 +++++++++++++++++++++++++++++ cmake/AddSYCLExecutable.cmake | 2 +- cmake/FindProtoSYCL.cmake | 28 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 cmake/AdaptProtoSYCL.cmake create mode 100644 cmake/FindProtoSYCL.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index abdd9f5c0..57ce0f968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ project(sycl_cts LANGUAGES CXX) if(SYCL_IMPLEMENTATION STREQUAL SimSYCL) set(CMAKE_CXX_STANDARD 20) +elseif(SYCL_IMPLEMENTATION STREQUAL ProtoSYCL) + set(CMAKE_CXX_STANDARD 23) else() set(CMAKE_CXX_STANDARD 17) endif() diff --git a/cmake/AdaptProtoSYCL.cmake b/cmake/AdaptProtoSYCL.cmake new file mode 100644 index 000000000..46dad248c --- /dev/null +++ b/cmake/AdaptProtoSYCL.cmake @@ -0,0 +1,29 @@ +add_library(SYCL::SYCL INTERFACE IMPORTED GLOBAL) +target_link_libraries(SYCL::SYCL INTERFACE ProtoSYCL) +# add_sycl_executable_implementation function +# Builds a SYCL program, compiling multiple SYCL test case source files into a +# test executable, invoking a single-source/device compiler +# Parameters are: +# - NAME Name of the test executable +# - OBJECT_LIBRARY Name of the object library of all the compiled test cases +# - TESTS List of SYCL test case source files to be built into the +# test executable +function(add_sycl_executable_implementation) + cmake_parse_arguments(args "" "NAME;OBJECT_LIBRARY" "TESTS" ${ARGN}) + set(exe_name ${args_NAME}) + set(object_lib_name ${args_OBJECT_LIBRARY}) + set(test_cases_list ${args_TESTS}) + + add_library(${object_lib_name} OBJECT ${test_cases_list}) + add_executable(${exe_name} $) + + add_sycl_to_target(TARGET ${object_lib_name} SOURCES ${test_cases_list}) + + set_target_properties(${object_lib_name} PROPERTIES + INCLUDE_DIRECTORIES $ + COMPILE_DEFINITIONS $ + COMPILE_OPTIONS $ + COMPILE_FEATURES $ + POSITION_INDEPENDENT_CODE ON) + +endfunction() diff --git a/cmake/AddSYCLExecutable.cmake b/cmake/AddSYCLExecutable.cmake index 32fb962d2..b82b9f6ed 100644 --- a/cmake/AddSYCLExecutable.cmake +++ b/cmake/AddSYCLExecutable.cmake @@ -1,4 +1,4 @@ -set (KNOWN_SYCL_IMPLEMENTATIONS "DPCPP;AdaptiveCpp;SimSYCL") +set (KNOWN_SYCL_IMPLEMENTATIONS "DPCPP;AdaptiveCpp;SimSYCL;ProtoSYCL") if ("${SYCL_IMPLEMENTATION}" STREQUAL "" OR NOT ${SYCL_IMPLEMENTATION} IN_LIST KNOWN_SYCL_IMPLEMENTATIONS) message(FATAL_ERROR "The SYCL CTS requires specifying a SYCL implementation with " diff --git a/cmake/FindProtoSYCL.cmake b/cmake/FindProtoSYCL.cmake new file mode 100644 index 000000000..d701e21e6 --- /dev/null +++ b/cmake/FindProtoSYCL.cmake @@ -0,0 +1,28 @@ +include(FetchContent) +FetchContent_Declare( + ProtoSYCL + GIT_REPOSITORY https://github.com/0x12CC/ProtoSYCL.git + GIT_TAG main +) +FetchContent_MakeAvailable(ProtoSYCL) +FetchContent_GetProperties(ProtoSYCL BINARY_DIR PROTOSYCL_BINARY_DIR) +set(CMAKE_CXX_COMPILER "${PROTOSYCL_BINARY_DIR}/sycl++") + +# This is needed since ProtoSYCL must be the first target built. It ensures +# sycl++ is available and can be used to build the other targets. +add_dependencies(OpenCL_Proxy ProtoSYCL) + +function(add_sycl_to_target) + set(options) + set(one_value_keywords TARGET) + set(multi_value_keywords SOURCES) + cmake_parse_arguments(ADD_SYCL + "${options}" + "${one_value_keywords}" + "${multi_value_keywords}" + ${ARGN} + ) + + target_link_libraries(${ADD_SYCL_TARGET} PUBLIC ProtoSYCL) + +endfunction() From c80df22fa61ab62f9b28789ee3fa27b45be99531 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 21 May 2026 07:36:18 -0700 Subject: [PATCH 02/21] Disambiguate `nextafter` Signed-off-by: Michael Aziz --- util/math_reference.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/math_reference.cpp b/util/math_reference.cpp index 9a38dd285..f2218bbd9 100644 --- a/util/math_reference.cpp +++ b/util/math_reference.cpp @@ -519,7 +519,8 @@ sycl::half fdim(sycl::half a, sycl::half b) { double resd = static_cast(a) - static_cast(b); sycl::half res = static_cast(resd); double diff = resd - static_cast(res); - sycl::half next = nextafter(res, static_cast(DBL_MAX * diff)); + sycl::half next = + reference::nextafter(res, static_cast(DBL_MAX * diff)); if (static_cast(next) - resd == diff) { int16_t rep; type_punn(next, rep); @@ -532,7 +533,8 @@ sycl::half fdim(sycl::half a, sycl::half b) { sycl::half fract(sycl::half a, sycl::half* b) { *b = std::floor(a); - return std::fmin(a - *b, nextafter(sycl::half(1.0), sycl::half(0.0))); + return std::fmin(a - *b, + reference::nextafter(sycl::half(1.0), sycl::half(0.0))); } sycl::half nan(unsigned short a) { return nan(unsigned(a)); } From 56092a027c816027d9a8dfefb745cae83ef3ac59 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 21 May 2026 07:36:51 -0700 Subject: [PATCH 03/21] Add ProtoSYCL to CI Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 4 ++++ ci/generate_exclude_filter.py | 4 ++-- ci/protosycl.filter | 4 ++++ docker/protosycl/Dockerfile | 15 +++++++++++++++ docker/protosycl/configure.sh | 14 ++++++++++++++ 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 ci/protosycl.filter create mode 100644 docker/protosycl/Dockerfile create mode 100644 docker/protosycl/configure.sh diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index c57043e03..0fba5a5b2 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -61,6 +61,8 @@ jobs: version: fcd26a61b600cd4b653724e59e72d4f7d1da259c - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d + - sycl-impl: protosycl + version: main steps: - name: Checkout uses: actions/checkout@v3 @@ -121,6 +123,8 @@ jobs: version: fcd26a61b600cd4b653724e59e72d4f7d1da259c - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d + - sycl-impl: protosycl + version: main env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} parallel-build-jobs: 2 diff --git a/ci/generate_exclude_filter.py b/ci/generate_exclude_filter.py index 42f660d54..4a35e89bc 100755 --- a/ci/generate_exclude_filter.py +++ b/ci/generate_exclude_filter.py @@ -42,8 +42,8 @@ def parse_arguments(): configuration-time test category filters for all failing targets.""") parser.add_argument('sycl_implementation', metavar="SYCL-Implementation", - choices=['DPCPP', 'AdaptiveCpp', 'SimSYCL'], type=str, - help="The SYCL implementation to use") + choices=['DPCPP', 'AdaptiveCpp', 'SimSYCL', 'ProtoSYCL'], + type=str, help="The SYCL implementation to use") parser.add_argument('--cmake-args', type=str, help="Arguments to pass on to CMake during configuration") parser.add_argument('-j', type=int, default=0, dest='parallel_jobs', diff --git a/ci/protosycl.filter b/ci/protosycl.filter new file mode 100644 index 000000000..230e130ce --- /dev/null +++ b/ci/protosycl.filter @@ -0,0 +1,4 @@ +device +group_functions +math_builtin_api +property diff --git a/docker/protosycl/Dockerfile b/docker/protosycl/Dockerfile new file mode 100644 index 000000000..ba5cd10e7 --- /dev/null +++ b/docker/protosycl/Dockerfile @@ -0,0 +1,15 @@ +FROM khronosgroup/sycl-cts-ci:common + +ARG IMPL_VERSION +RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt update && \ + apt install -y --no-install-recommends clang \ + apt-get clean && \ + rm -rf /var/lib/apt/lists* + +ENV CC=clang +ENV CXX=clang++ + +COPY configure.sh /scripts/ diff --git a/docker/protosycl/configure.sh b/docker/protosycl/configure.sh new file mode 100644 index 000000000..475c72df0 --- /dev/null +++ b/docker/protosycl/configure.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -o errexit -o pipefail -o noclobber -o nounset +cmake . -G Ninja -B build \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DSYCL_IMPLEMENTATION=ProtoSYCL \ + -DCMAKE_PREFIX_PATH=/sycl \ + -DCMAKE_BUILD_TYPE=Release \ + -DSYCL_CTS_ENABLE_FULL_CONFORMANCE=OFF \ + -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \ + -DSYCL_CTS_ENABLE_CUDA_INTEROP_TESTS=OFF \ + -DSYCL_CTS_ENABLE_HALF_TESTS=ON \ + -DSYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS=ON \ + -DSYCL_CTS_ENABLE_FEATURE_SET_FULL=ON \ + $@ From 85351639f9f5df6ce18e9275e811f889aabf69c0 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 21 May 2026 08:16:57 -0700 Subject: [PATCH 04/21] Revert "Disambiguate `nextafter`" This reverts commit c80df22fa61ab62f9b28789ee3fa27b45be99531. Signed-off-by: Michael Aziz --- util/math_reference.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/math_reference.cpp b/util/math_reference.cpp index f2218bbd9..9a38dd285 100644 --- a/util/math_reference.cpp +++ b/util/math_reference.cpp @@ -519,8 +519,7 @@ sycl::half fdim(sycl::half a, sycl::half b) { double resd = static_cast(a) - static_cast(b); sycl::half res = static_cast(resd); double diff = resd - static_cast(res); - sycl::half next = - reference::nextafter(res, static_cast(DBL_MAX * diff)); + sycl::half next = nextafter(res, static_cast(DBL_MAX * diff)); if (static_cast(next) - resd == diff) { int16_t rep; type_punn(next, rep); @@ -533,8 +532,7 @@ sycl::half fdim(sycl::half a, sycl::half b) { sycl::half fract(sycl::half a, sycl::half* b) { *b = std::floor(a); - return std::fmin(a - *b, - reference::nextafter(sycl::half(1.0), sycl::half(0.0))); + return std::fmin(a - *b, nextafter(sycl::half(1.0), sycl::half(0.0))); } sycl::half nan(unsigned short a) { return nan(unsigned(a)); } From c202b19958c89805fa43256fd5e7980830e3ea07 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 08:11:46 -0700 Subject: [PATCH 05/21] Update container config Signed-off-by: Michael Aziz --- cmake/FindProtoSYCL.cmake | 9 +-------- docker/protosycl/Dockerfile | 33 ++++++++++++++++++++++++++++----- docker/protosycl/configure.sh | 5 +++-- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/cmake/FindProtoSYCL.cmake b/cmake/FindProtoSYCL.cmake index d701e21e6..0b6472e34 100644 --- a/cmake/FindProtoSYCL.cmake +++ b/cmake/FindProtoSYCL.cmake @@ -1,16 +1,9 @@ include(FetchContent) FetchContent_Declare( ProtoSYCL - GIT_REPOSITORY https://github.com/0x12CC/ProtoSYCL.git - GIT_TAG main + SOURCE_DIR /ProtoSYCL ) FetchContent_MakeAvailable(ProtoSYCL) -FetchContent_GetProperties(ProtoSYCL BINARY_DIR PROTOSYCL_BINARY_DIR) -set(CMAKE_CXX_COMPILER "${PROTOSYCL_BINARY_DIR}/sycl++") - -# This is needed since ProtoSYCL must be the first target built. It ensures -# sycl++ is available and can be used to build the other targets. -add_dependencies(OpenCL_Proxy ProtoSYCL) function(add_sycl_to_target) set(options) diff --git a/docker/protosycl/Dockerfile b/docker/protosycl/Dockerfile index ba5cd10e7..43f0bbb25 100644 --- a/docker/protosycl/Dockerfile +++ b/docker/protosycl/Dockerfile @@ -3,13 +3,36 @@ FROM khronosgroup/sycl-cts-ci:common ARG IMPL_VERSION RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) -RUN export DEBIAN_FRONTEND=noninteractive && \ - apt update && \ - apt install -y --no-install-recommends clang \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* +# Install LLVM script dependencies. +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + wget \ + gnupg \ + lsb-release \ + g++-14 \ + software-properties-common && \ + rm -rf /var/lib/apt/lists/* +# Install LLVM 22. +RUN wget https://apt.llvm.org/llvm.sh && \ + chmod +x llvm.sh && \ + ./llvm.sh 22 all && \ + rm llvm.sh + +# Set clang-22 as the default clang version. +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-22 100 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-22 100 ENV CC=clang ENV CXX=clang++ +# Build ProtoSYCL. +RUN git clone https://github.com/0x12CC/ProtoSYCL.git && \ + cd ProtoSYCL && \ + git checkout $IMPL_VERSION && \ + mkdir build && \ + cd build && \ + cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja && \ + ninja + +# Copy the configure script to the /scripts directory. COPY configure.sh /scripts/ diff --git a/docker/protosycl/configure.sh b/docker/protosycl/configure.sh index 475c72df0..352a8439f 100644 --- a/docker/protosycl/configure.sh +++ b/docker/protosycl/configure.sh @@ -2,9 +2,10 @@ set -o errexit -o pipefail -o noclobber -o nounset cmake . -G Ninja -B build \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DSYCL_IMPLEMENTATION=ProtoSYCL \ - -DCMAKE_PREFIX_PATH=/sycl \ + -DCMAKE_CXX_COMPILER=/ProtoSYCL/build/sycl++ \ + -DCMAKE_CXX_STANDARD=23 \ -DCMAKE_BUILD_TYPE=Release \ + -DSYCL_IMPLEMENTATION=ProtoSYCL \ -DSYCL_CTS_ENABLE_FULL_CONFORMANCE=OFF \ -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \ -DSYCL_CTS_ENABLE_CUDA_INTEROP_TESTS=OFF \ From a83b4dd0e5d63cb3081537c429fcf4dbb2095e18 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 08:15:22 -0700 Subject: [PATCH 06/21] Add commit hash Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 627f6b023..f0d3727a0 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -62,7 +62,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: main + version: c57f50ceb66d33376d141de45fce6b1e7826f8ac steps: - name: Checkout uses: actions/checkout@v3 @@ -124,7 +124,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: main + version: c57f50ceb66d33376d141de45fce6b1e7826f8ac env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} parallel-build-jobs: 2 From fa9b2d02fee4e9e76d192d2e8fde6cac740875c9 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 12:00:08 -0400 Subject: [PATCH 07/21] Add kernel bundle to CI filter due to a runtime error Signed-off-by: Michael Aziz --- ci/protosycl.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/protosycl.filter b/ci/protosycl.filter index 230e130ce..5da15ace3 100644 --- a/ci/protosycl.filter +++ b/ci/protosycl.filter @@ -1,4 +1,5 @@ device group_functions +kernel_bundle math_builtin_api property From 105f5a2f9c82e27d26a3f533c042a23c3db6e5ba Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 12:00:22 -0400 Subject: [PATCH 08/21] Add ProtoSYCL to `disabled_for_test_case.h` Signed-off-by: Michael Aziz --- tests/common/disabled_for_test_case.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/common/disabled_for_test_case.h b/tests/common/disabled_for_test_case.h index cc0357624..eeebd3cbf 100644 --- a/tests/common/disabled_for_test_case.h +++ b/tests/common/disabled_for_test_case.h @@ -54,6 +54,8 @@ #define INTERNAL_CTS_SYCL_IMPL_AdaptiveCpp () #elif SYCL_CTS_COMPILING_WITH_SIMSYCL #define INTERNAL_CTS_SYCL_IMPL_SimSYCL () +#elif SYCL_CTS_COMPILING_WITH_PROTOSYCL +#define INTERNAL_CTS_SYCL_IMPL_ProtoSYCL () #else #error Unknown SYCL implementation #endif From 4961db7760149cdca6695c2ed383acecaa42a63f Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 12:27:49 -0400 Subject: [PATCH 09/21] Disambiguate `nextafter` Signed-off-by: Michael Aziz (cherry picked from commit ae44aeb995bc061a79f3964e0d82a071d17aab4a) --- util/math_reference.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/math_reference.cpp b/util/math_reference.cpp index 9a38dd285..f2218bbd9 100644 --- a/util/math_reference.cpp +++ b/util/math_reference.cpp @@ -519,7 +519,8 @@ sycl::half fdim(sycl::half a, sycl::half b) { double resd = static_cast(a) - static_cast(b); sycl::half res = static_cast(resd); double diff = resd - static_cast(res); - sycl::half next = nextafter(res, static_cast(DBL_MAX * diff)); + sycl::half next = + reference::nextafter(res, static_cast(DBL_MAX * diff)); if (static_cast(next) - resd == diff) { int16_t rep; type_punn(next, rep); @@ -532,7 +533,8 @@ sycl::half fdim(sycl::half a, sycl::half b) { sycl::half fract(sycl::half a, sycl::half* b) { *b = std::floor(a); - return std::fmin(a - *b, nextafter(sycl::half(1.0), sycl::half(0.0))); + return std::fmin(a - *b, + reference::nextafter(sycl::half(1.0), sycl::half(0.0))); } sycl::half nan(unsigned short a) { return nan(unsigned(a)); } From 24a1ef3226250c26e30770c6ac42a44b29be200f Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 27 May 2026 14:44:43 -0400 Subject: [PATCH 10/21] Disable context tests until changes from #1171 work Signed-off-by: Michael Aziz --- ci/protosycl.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/protosycl.filter b/ci/protosycl.filter index 5da15ace3..44dc895ef 100644 --- a/ci/protosycl.filter +++ b/ci/protosycl.filter @@ -1,3 +1,4 @@ +context device group_functions kernel_bundle From 7790cb0f4355585484b24ca91805036b68c0c502 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 28 May 2026 01:08:32 -0400 Subject: [PATCH 11/21] Use g++ 15 Signed-off-by: Michael Aziz --- docker/protosycl/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/protosycl/Dockerfile b/docker/protosycl/Dockerfile index 43f0bbb25..75815d4df 100644 --- a/docker/protosycl/Dockerfile +++ b/docker/protosycl/Dockerfile @@ -3,13 +3,14 @@ FROM khronosgroup/sycl-cts-ci:common ARG IMPL_VERSION RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) -# Install LLVM script dependencies. -RUN apt-get update && \ +# Install dependencies. +RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ + apt-get update && \ apt-get install -y --no-install-recommends \ wget \ gnupg \ lsb-release \ - g++-14 \ + g++-15 \ software-properties-common && \ rm -rf /var/lib/apt/lists/* From 469fc00c824f0088c71b8ca8d294e90428c9251b Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 28 May 2026 01:14:36 -0400 Subject: [PATCH 12/21] Fix container build error Signed-off-by: Michael Aziz --- docker/protosycl/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/protosycl/Dockerfile b/docker/protosycl/Dockerfile index 75815d4df..458e90e1f 100644 --- a/docker/protosycl/Dockerfile +++ b/docker/protosycl/Dockerfile @@ -4,14 +4,16 @@ ARG IMPL_VERSION RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) # Install dependencies. -RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + software-properties-common && \ + add-apt-repository ppa:ubuntu-toolchain-r/test && \ apt-get update && \ apt-get install -y --no-install-recommends \ wget \ gnupg \ lsb-release \ g++-15 \ - software-properties-common && \ rm -rf /var/lib/apt/lists/* # Install LLVM 22. From c4574b2e393a925d964acfe34ecce81647745a50 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 28 May 2026 01:19:28 -0400 Subject: [PATCH 13/21] Fix another container build error Signed-off-by: Michael Aziz --- docker/protosycl/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/protosycl/Dockerfile b/docker/protosycl/Dockerfile index 458e90e1f..045e92dcb 100644 --- a/docker/protosycl/Dockerfile +++ b/docker/protosycl/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && \ wget \ gnupg \ lsb-release \ - g++-15 \ + g++-15 && \ rm -rf /var/lib/apt/lists/* # Install LLVM 22. From c764e6a856a7931d0d6aeac663c8f54564eb5dc2 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 28 May 2026 09:21:48 -0400 Subject: [PATCH 14/21] Update commit hash Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index f0d3727a0..32d520592 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -62,7 +62,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: c57f50ceb66d33376d141de45fce6b1e7826f8ac + version: 6e0e5b2c7b7ba94bded686dda34ca707294d394a steps: - name: Checkout uses: actions/checkout@v3 @@ -124,7 +124,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: c57f50ceb66d33376d141de45fce6b1e7826f8ac + version: 6e0e5b2c7b7ba94bded686dda34ca707294d394a env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} parallel-build-jobs: 2 From 9f14e3a0bcff2e1cf0f35a58c05bfdff1b694e1f Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Thu, 28 May 2026 09:27:38 -0400 Subject: [PATCH 15/21] Update commit hash Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 32d520592..93434861d 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -62,7 +62,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: 6e0e5b2c7b7ba94bded686dda34ca707294d394a + version: f48ad43d9c1f85d6ac5cc3abb00ee764d7f1edbd steps: - name: Checkout uses: actions/checkout@v3 @@ -124,7 +124,7 @@ jobs: - sycl-impl: simsycl version: 960c155109b066b26c1ecb6b2348ff9f6b69704d - sycl-impl: protosycl - version: 6e0e5b2c7b7ba94bded686dda34ca707294d394a + version: f48ad43d9c1f85d6ac5cc3abb00ee764d7f1edbd env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} parallel-build-jobs: 2 From 1bc0dfe823dbc5cba5c9a3bdadf15f004a165031 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 10:03:37 -0400 Subject: [PATCH 16/21] Add test execution Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 93434861d..921597f9f 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -176,6 +176,11 @@ jobs: with: name: build-times-${{ matrix.sycl-impl }} path: ${{ env.container-workspace }}/build/build_times.log + - name: Upload test binaries artifact + uses: actions/upload-artifact@v4 + with: + name: test-binaries-${{ matrix.sycl-impl }} + path: ${{ env.container-workspace }}/build/bin # This job simply summarizes the results of the "compile-cts" matrix build job above. # It can then be used in a branch protection rule instead of having to enumerate all @@ -192,3 +197,47 @@ jobs: else exit 1 fi + + run-cts: + needs: cts-compiles-for-all-implementations + if: needs.cts-compiles-for-all-implementations.result == 'success' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - sycl-impl: protosycl + version: f48ad43d9c1f85d6ac5cc3abb00ee764d7f1edbd + env: + container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} + parallel-build-jobs: 2 + container: + image: khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} + steps: + - name: Download test binaries artifact + uses: actions/download-artifact@v4 + with: + name: test-binaries-${{ matrix.sycl-impl }} + path: ${{ env.container-workspace }}/bin + - name: Run the tests + working-directory: ${{ env.container-workspace }} + run: | + find bin/ -type f -executable | while read -r binary; do + echo "=== Running test category: $binary ===" + "$binary" + done + + cts-passes-for-all-implementations: + needs: run-cts + if: always() + runs-on: ubuntu-22.04 + steps: + - name: Summarize matrix test results + run: | + if [[ "${{ needs.run-cts.result }}" == "success" ]]; then + echo "CTS tests succeeded for all implementations. Ready to run tests in separate workflow." + exit 0 + else + echo "CTS tests failed for at least one implementation. Please check the 'run-cts' job for details." + exit 1 + fi From 8c9d5b02d45602075d29630608d7a00e470c43a5 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 10:04:41 -0400 Subject: [PATCH 17/21] Increase `parallel-build-jobs` to 4 Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 921597f9f..79d567046 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -127,7 +127,7 @@ jobs: version: f48ad43d9c1f85d6ac5cc3abb00ee764d7f1edbd env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - parallel-build-jobs: 2 + parallel-build-jobs: 4 container: image: khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} steps: @@ -210,7 +210,6 @@ jobs: version: f48ad43d9c1f85d6ac5cc3abb00ee764d7f1edbd env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - parallel-build-jobs: 2 container: image: khronosgroup/sycl-cts-ci:${{ matrix.sycl-impl }}-${{ matrix.version }} steps: From c0fc0a33f4a5a29859d0afd2d47ceaf5c8e696be Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 12:08:48 -0400 Subject: [PATCH 18/21] Make sure X flag is set on test binaries Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 79d567046..a3ce37b98 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -221,6 +221,7 @@ jobs: - name: Run the tests working-directory: ${{ env.container-workspace }} run: | + chmod -R +x bin/ find bin/ -type f -executable | while read -r binary; do echo "=== Running test category: $binary ===" "$binary" From 071303e9f39537d7adb76a1681dd5ca44c637ea1 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 14:22:55 -0400 Subject: [PATCH 19/21] Set `CCACHE_COMPILER_TYPE` to clang Signed-off-by: Michael Aziz --- .github/workflows/cts_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index a3ce37b98..609431a44 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -156,6 +156,7 @@ jobs: run: | echo "CCACHE_DEPEND=1" >> "$GITHUB_ENV" echo "CCACHE_DIR=${{ env.container-workspace }}/.ccache" >> "$GITHUB_ENV" + echo "CCACHE_COMPILER_TYPE=clang" >> "$GITHUB_ENV" - name: Build 'oclmath' working-directory: ${{ env.container-workspace }}/build run: cmake --build . --target oclmath From 2c169d477d5814f56c4704d1f64e8b88eb048687 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 14:23:41 -0400 Subject: [PATCH 20/21] Revert "Disambiguate `nextafter`" This reverts commit 4961db7760149cdca6695c2ed383acecaa42a63f. Signed-off-by: Michael Aziz --- util/math_reference.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/math_reference.cpp b/util/math_reference.cpp index f2218bbd9..9a38dd285 100644 --- a/util/math_reference.cpp +++ b/util/math_reference.cpp @@ -519,8 +519,7 @@ sycl::half fdim(sycl::half a, sycl::half b) { double resd = static_cast(a) - static_cast(b); sycl::half res = static_cast(resd); double diff = resd - static_cast(res); - sycl::half next = - reference::nextafter(res, static_cast(DBL_MAX * diff)); + sycl::half next = nextafter(res, static_cast(DBL_MAX * diff)); if (static_cast(next) - resd == diff) { int16_t rep; type_punn(next, rep); @@ -533,8 +532,7 @@ sycl::half fdim(sycl::half a, sycl::half b) { sycl::half fract(sycl::half a, sycl::half* b) { *b = std::floor(a); - return std::fmin(a - *b, - reference::nextafter(sycl::half(1.0), sycl::half(0.0))); + return std::fmin(a - *b, nextafter(sycl::half(1.0), sycl::half(0.0))); } sycl::half nan(unsigned short a) { return nan(unsigned(a)); } From 97bbca0974a13b3839fd315419fdc08e79ae8309 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Wed, 3 Jun 2026 16:06:20 -0400 Subject: [PATCH 21/21] Test ccache build Signed-off-by: Michael Aziz