-
Notifications
You must be signed in to change notification settings - Fork 92
Add ProtoSYCL to the CTS #1201
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
Draft
0x12CC
wants to merge
23
commits into
main
Choose a base branch
from
protosycl
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add ProtoSYCL to the CTS #1201
Changes from all commits
Commits
Show all changes
23 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 fa9b2d0
Add kernel bundle to CI filter due to a runtime error
0x12CC 105f5a2
Add ProtoSYCL to `disabled_for_test_case.h`
0x12CC 4961db7
Disambiguate `nextafter`
0x12CC 24a1ef3
Disable context tests until changes from #1171 work
0x12CC 7790cb0
Use g++ 15
0x12CC 469fc00
Fix container build error
0x12CC c4574b2
Fix another container build error
0x12CC c764e6a
Update commit hash
0x12CC 9f14e3a
Update commit hash
0x12CC 1bc0dfe
Add test execution
0x12CC 8c9d5b0
Increase `parallel-build-jobs` to 4
0x12CC c0fc0a3
Make sure X flag is set on test binaries
0x12CC 071303e
Set `CCACHE_COMPILER_TYPE` to clang
0x12CC 2c169d4
Revert "Disambiguate `nextafter`"
0x12CC ecb0242
Merge branch 'main' into protosycl
0x12CC 97bbca0
Test ccache build
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,6 @@ | ||
| context | ||
| device | ||
| group_functions | ||
| kernel_bundle | ||
| 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,41 @@ | ||
| FROM khronosgroup/sycl-cts-ci:common | ||
|
|
||
| ARG IMPL_VERSION | ||
| RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) | ||
|
|
||
| # Install dependencies. | ||
| 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 && \ | ||
| 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 \ | ||
| $@ |
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
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.
Is the
FetchContentin cmake/FindProtoSYCL.cmake not enough?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.
The
FetchContentwill build the compiler and runtime library. The reason I've set it up this way is so that we can select the implementation version in.github/workflows/cts_ci.ymljust like for other implementations. It also ensures the SYCL compiler is built before the first target in the CTS. I'm hoping there will be a better way once CMake supports SYCL.