Skip to content

Commit

Permalink
Merge pull request #874 from KhronosGroup/hipsycl-to-adaptivecpp
Browse files Browse the repository at this point in the history
Rename hipSYCL to AdaptiveCpp, update CI and regenerate filter
  • Loading branch information
bader authored Dec 20, 2024
2 parents c28362f + af2da6f commit 011a98a
Show file tree
Hide file tree
Showing 162 changed files with 782 additions and 746 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# the corresponding owner only.
/cmake/FindDPCPP.cmake @bader
/cmake/AdaptDPCPP.cmake @bader
/cmake/FindhipSYCL.cmake @illuhad
/cmake/FindAdaptiveCpp.cmake @illuhad

/test_plans @gmlueck @KhronosGroup/sycl-cts-reviewers
8 changes: 4 additions & 4 deletions .github/workflows/cts_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
include:
- sycl-impl: dpcpp
version: 6456fe89646deb8bf30c0eb32827a62ff6e58ffb
- sycl-impl: hipsycl
version: 3d8b1cd
- sycl-impl: adaptivecpp
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -115,8 +115,8 @@ jobs:
include:
- sycl-impl: dpcpp
version: 6456fe89646deb8bf30c0eb32827a62ff6e58ffb
- sycl-impl: hipsycl
version: 3d8b1cd
- sycl-impl: adaptivecpp
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899
env:
container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
parallel-build-jobs: 2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To compile the CTS, the following dependencies are required:
- Python 3.7 or higher
- CMake 3.15 or higher
- A SYCL implementation
- The CTS currently supports DPC++ and hipSYCL
- The CTS currently supports DPC++ and AdaptiveCpp
- See the [AddSYCLExecutable.cmake](cmake/AddSYCLExecutable.cmake) module on
how to add support for additional SYCL implementations

Expand All @@ -35,7 +35,7 @@ cloning this repository and its submodules:

Then enter the `SYCL-CTS` folder and configure the build using CMake:

`cmake -S . -B build -DSYCL_IMPLEMENTATION=<DPCPP|hipSYCL>`
`cmake -S . -B build -DSYCL_IMPLEMENTATION=<DPCPP|AdaptiveCpp>`

See [CMake Configuration Options](#cmake-configuration-options) for additional
configuration options that can be passed here.
Expand All @@ -52,7 +52,7 @@ placed in the `build/bin` directory.
The CTS can be configured using the following CMake configuration options:

`SYCL_IMPLEMENTATION` (default: None)
`DPCPP` or `hipSYCL`.
`DPCPP` or `AdaptiveCpp`.

`SYCL_CTS_EXCLUDE_TEST_CATEGORIES` (default: None)
Optional file specifying a list of test categories to be excluded from the build.
Expand Down
32 changes: 30 additions & 2 deletions ci/hipsycl.filter → ci/adaptivecpp.filter
Original file line number Diff line number Diff line change
@@ -1,44 +1,72 @@
accessor_basic
accessor_generic
accessor_legacy
accessor_placeholder
address_space
atomic
atomic_fence
atomic_ref
atomic_ref_stress
bit_cast
buffer
context
device
device_event
device_selector
error
event
exception_handling
exceptions
full_feature_set
group
group_functions
h_item
handler
header
hierarchical
host_accessor
host_task
id
image
image_accessor
invoke
is_device_copyable
item
kernel
kernel_args
kernel_bundle
language
local_accessor
marray_arithmetic_assignment
marray_arithmetic_binary
marray_basic
marray_bitwise
marray_pre_post
marray_relational
marray_arithmetic_assignment
marray_arithmetic_binary
math_builtin_api
multi_ptr
namespace
nd_item
nd_range
opencl_interop
optional_kernel_features
platform
pointers
property
queue
range
reduction
sampler
scalars
spec_constants
stream
sub_group
sycl_external
usm
vector_alias
vector_api
vector_constructors
vector_deduction_guides
vector_load_store
vector_operators
vector_swizzle_assignment
Expand Down
2 changes: 1 addition & 1 deletion ci/generate_exclude_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def parse_arguments():
configuration-time test category filters for all failing targets.""")

parser.add_argument('sycl_implementation', metavar="SYCL-Implementation",
choices=['DPCPP', 'hipSYCL'], type=str,
choices=['DPCPP', 'AdaptiveCpp'], type=str,
help="The SYCL implementation to use")
parser.add_argument('--cmake-args', type=str,
help="Arguments to pass on to CMake during configuration")
Expand Down
4 changes: 2 additions & 2 deletions cmake/AdapthipSYCL.cmake → cmake/AdaptAdaptiveCpp.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(SYCL::SYCL INTERFACE IMPORTED GLOBAL)
target_link_libraries(SYCL::SYCL INTERFACE hipSYCL::hipSYCL-rt)
target_link_libraries(SYCL::SYCL INTERFACE AdaptiveCpp::acpp-rt)
# 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
Expand All @@ -17,7 +17,7 @@ function(add_sycl_executable_implementation)
add_library(${object_lib_name} OBJECT ${test_cases_list})
add_executable(${exe_name} $<TARGET_OBJECTS:${object_lib_name}>)

# hipSYCL needs the macro to be called on both the object library (to
# AdaptiveCpp needs the macro to be called on both the object library (to
# override the compiler) and the executable (to override the linker).
add_sycl_to_target(TARGET ${object_lib_name} SOURCES ${test_cases_list})
add_sycl_to_target(TARGET ${exe_name})
Expand Down
4 changes: 2 additions & 2 deletions cmake/AddSYCLExecutable.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set (KNOWN_SYCL_IMPLEMENTATIONS "DPCPP;hipSYCL")
set (KNOWN_SYCL_IMPLEMENTATIONS "DPCPP;AdaptiveCpp")
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 "
"-DSYCL_IMPLEMENTATION=[DPCPP;hipSYCL]")
"-DSYCL_IMPLEMENTATION=[DPCPP;AdaptiveCpp]")
endif()

if(NOT TARGET OpenCL_Proxy)
Expand Down
21 changes: 14 additions & 7 deletions docker/hipsycl/Dockerfile → docker/adaptivecpp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hipSYCL version (git revision) to install
# AdaptiveCpp version (git revision) to install
ARG IMPL_VERSION

FROM khronosgroup/sycl-cts-ci:common
Expand All @@ -14,15 +14,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get clean && \
rm -rf /var/lib/apt/lists*

RUN git clone https://github.com/illuhad/hipSYCL.git \
--branch=develop --single-branch --shallow-since=2021-08-01 \
--recurse-submodules /tmp/hipSYCL && \
cd /tmp/hipSYCL && \
RUN git clone https://github.com/AdaptiveCpp/AdaptiveCpp.git \
--branch=develop --single-branch --shallow-since=2024-12-01 \
--recurse-submodules /tmp/AdaptiveCpp && \
cd /tmp/AdaptiveCpp && \
git checkout $IMPL_VERSION && \
cmake /tmp/hipSYCL -G Ninja -B /tmp/build \
cmake /tmp/AdaptiveCpp -G Ninja -B /tmp/build \
-DWITH_SSCP_COMPILER=OFF \
-DWITH_STDPAR_COMPILER=OFF \
-DWITH_ACCELERATED_CPU=OFF \
-DWITH_CUDA_BACKEND=OFF \
-DWITH_ROCM_BACKEND=OFF \
-DWITH_OPENCL_BACKEND=OFF \
-DWITH_CPU_BACKEND=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/sycl && \
cmake --build /tmp/build --target install && \
rm -rf /tmp/hipSYCL /tmp/build
rm -rf /tmp/AdaptiveCpp /tmp/build

COPY configure.sh /scripts/
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit -o pipefail -o noclobber -o nounset

cmake . -G Ninja -B build \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DSYCL_IMPLEMENTATION=hipSYCL \
-DSYCL_IMPLEMENTATION=AdaptiveCpp \
-DCMAKE_PREFIX_PATH=/sycl \
-DCMAKE_BUILD_TYPE=Release \
-DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=0 \
Expand Down
2 changes: 1 addition & 1 deletion docker/common/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

# We install OpenCL to enable compilation of interop tests (for SYCL
# implementations that support it).
Expand Down
8 changes: 4 additions & 4 deletions docs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ Their usage is best explained in an example:

[source,c++]
----
DISABLED_FOR_TEST_CASE(hipSYCL)("some feature works as expected", "[some-feature]")({
CHECK(sycl::something_that_hipsycl_does_not_yet_support() == 123);
DISABLED_FOR_TEST_CASE(AdaptiveCpp)("some feature works as expected", "[some-feature]")({
CHECK(sycl::something_that_adaptivecpp_does_not_yet_support() == 123);
});
----

While for other SYCL implementations the test case will compile as if it were a normal `TEST_CASE`, for hipSYCL it will instead compile to a test case that fails at runtime with the message `"This test case has been compile-time disabled."`.
While for other SYCL implementations the test case will compile as if it were a normal `TEST_CASE`, for AdaptiveCpp it will instead compile to a test case that fails at runtime with the message `"This test case has been compile-time disabled."`.

Note that unlike the normal `TEST_CASE` macro, `DISABLED_FOR_TEST_CASE` requires that the body of the test is wrapped in parentheses and followed by a semicolon.

Expand All @@ -341,7 +341,7 @@ The CTS currently provides the following macros for compile-time disabling test
* `DISABLED_FOR_TEST_CASE(<impls...>)(<description>, <tags>)(<body>)`
* `DISABLED_FOR_TEMPLATE_TEST_CASE_SIG(<impls...>)(<description>, <tags>, <signature>, <types...>)(<body>)`

where `<impls...>` is a comma-separated list of `hipSYCL` and/or `DPCPP`.
where `<impls...>` is a comma-separated list of `AdaptiveCpp` and/or `DPCPP`.

NOTE: #**TODO:** Custom matchers.#

Expand Down
Loading

0 comments on commit 011a98a

Please sign in to comment.