-
Notifications
You must be signed in to change notification settings - Fork 92
Add ProtoSYCL to the CTS #1200
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
Closed
Closed
Add ProtoSYCL to the CTS #1200
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
36cd977
Add ProtoSYCL impl to CMake
0x12CC c80df22
Disambiguate `nextafter`
0x12CC 56092a0
Add ProtoSYCL to CI
0x12CC a43ecb3
Merge branch 'main' into protosycl
0x12CC 8535163
Revert "Disambiguate `nextafter`"
0x12CC c202b19
Update container config
0x12CC a83b4dd
Add commit hash
0x12CC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| device | ||
| group_functions | ||
| math_builtin_api | ||
| property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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} $<TARGET_OBJECTS:${object_lib_name}>) | ||
|
|
||
| add_sycl_to_target(TARGET ${object_lib_name} SOURCES ${test_cases_list}) | ||
|
|
||
| set_target_properties(${object_lib_name} PROPERTIES | ||
| INCLUDE_DIRECTORIES $<TARGET_PROPERTY:${exe_name},INCLUDE_DIRECTORIES> | ||
| COMPILE_DEFINITIONS $<TARGET_PROPERTY:${exe_name},COMPILE_DEFINITIONS> | ||
| COMPILE_OPTIONS $<TARGET_PROPERTY:${exe_name},COMPILE_OPTIONS> | ||
| COMPILE_FEATURES $<TARGET_PROPERTY:${exe_name},COMPILE_FEATURES> | ||
| POSITION_INDEPENDENT_CODE ON) | ||
|
|
||
| endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| ProtoSYCL | ||
| SOURCE_DIR /ProtoSYCL | ||
| ) | ||
| FetchContent_MakeAvailable(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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| 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 && \ | ||
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/usr/bin/env bash | ||
| set -o errexit -o pipefail -o noclobber -o nounset | ||
| cmake . -G Ninja -B build \ | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
| -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 \ | ||
| -DSYCL_CTS_ENABLE_HALF_TESTS=ON \ | ||
| -DSYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS=ON \ | ||
| -DSYCL_CTS_ENABLE_FEATURE_SET_FULL=ON \ | ||
| $@ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I suggest moving this to
cmake/FindProtoSYCL.cmaketo isolate implementation specific settings similar tocmake/FindDPCPP.cmake.