Skip to content

Commit

Permalink
Merge branch 'main' into update_root_group_query
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Aziz <[email protected]>
  • Loading branch information
0x12CC committed Dec 23, 2024
2 parents 43b5f03 + f1e6fd0 commit ae02230
Show file tree
Hide file tree
Showing 175 changed files with 1,200 additions and 776 deletions.
5 changes: 2 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# Implementation specific cmake configuration file needs approval from
# the corresponding owner only.
/cmake/FindDPCPP.cmake @bader
/cmake/FindhipSYCL.cmake @illuhad
# TODO: remove FindIntel_SYCL configuration file
/cmake/FindIntel_SYCL.cmake @bader
/cmake/AdaptDPCPP.cmake @bader
/cmake/FindAdaptiveCpp.cmake @illuhad

/test_plans @gmlueck @KhronosGroup/sycl-cts-reviewers
12 changes: 6 additions & 6 deletions .github/workflows/cts_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
matrix:
include:
- sycl-impl: dpcpp
version: 20a088e1231c4ac85fd74c0de79c563977d2f38c
- sycl-impl: hipsycl
version: 3d8b1cd
version: ca955e538171cb7b7eb07734dd5c2b958c84901c
- sycl-impl: adaptivecpp
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -114,9 +114,9 @@ jobs:
matrix:
include:
- sycl-impl: dpcpp
version: 20a088e1231c4ac85fd74c0de79c563977d2f38c
- sycl-impl: hipsycl
version: 3d8b1cd
version: ca955e538171cb7b7eb07734dd5c2b958c84901c
- sycl-impl: adaptivecpp
version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899
env:
container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
parallel-build-jobs: 2
Expand Down
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ add_cts_option(SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS
add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS
"Enable all extension oneAPI tests" OFF)

add_cts_option(SYCL_CTS_ENABLE_KHR_TESTS
"Enable all extension Khronos tests" OFF)

add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_PROPERTIES_TESTS
"Enable extension oneAPI compile-time property list tests" OFF
FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS})
Expand Down Expand Up @@ -103,6 +106,14 @@ add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_ENQUEUE_FUNCTIONS_TESTS
"Enable extension oneAPI enqueue_functions tests" OFF
FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS})

add_cts_option(SYCL_CTS_ENABLE_EXT_ONEAPI_LOCAL_MEMORY_TESTS
"Enable extension oneAPI local_memory tests" OFF
FORCE_ON ${SYCL_CTS_ENABLE_EXT_ONEAPI_TESTS})

add_cts_option(SYCL_CTS_ENABLE_KHR_DEFAULT_CONTEXT_TESTS
"Enable extension Khronos default_context tests" OFF
FORCE_ON ${SYCL_CTS_ENABLE_KHR_TESTS})

# TODO: Deprecated - remove
add_cts_option(SYCL_CTS_ENABLE_VERBOSE_LOG
"Enable debug-level logs (deprecated)" OFF)
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
12 changes: 4 additions & 8 deletions cmake/AddSYCLExecutable.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set (KNOWN_SYCL_IMPLEMENTATIONS "Intel_SYCL;DPCPP;hipSYCL")
if (NOT ${SYCL_IMPLEMENTATION} IN_LIST KNOWN_SYCL_IMPLEMENTATIONS)
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=[Intel_SYCL,DPCPP;hipSYCL]")
"-DSYCL_IMPLEMENTATION=[DPCPP;AdaptiveCpp]")
endif()

if(NOT TARGET OpenCL_Proxy)
Expand All @@ -13,11 +13,7 @@ if(NOT TARGET OpenCL_Proxy)
)
endif()

if(${SYCL_IMPLEMENTATION} STREQUAL "Intel_SYCL")
set(CANONICAL_SYCL_IMPLEMENTATION "DPCPP")
else()
string(TOUPPER ${SYCL_IMPLEMENTATION} CANONICAL_SYCL_IMPLEMENTATION)
endif()
string(TOUPPER ${SYCL_IMPLEMENTATION} CANONICAL_SYCL_IMPLEMENTATION)

find_package(${SYCL_IMPLEMENTATION} REQUIRED)
find_file(SYCL_IMPLEMENTATION_ADAPTER
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindDPCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ set_target_properties(DPCPP::Runtime PROPERTIES

set(CMAKE_CXX_COMPILER ${DPCPP_CXX_EXECUTABLE})
# Use DPC++ compiler instead of default linker for building SYCL application
set(CMAKE_CXX_LINK_EXECUTABLE "${DPCPP_CXX_EXECUTABLE} <FLAGS> \
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE "${DPCPP_CXX_EXECUTABLE} <FLAGS> <OBJECTS> -o <TARGET> \
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")

function(add_sycl_to_target)
set(options)
Expand Down
10 changes: 0 additions & 10 deletions cmake/FindIntel_SYCL.cmake

This file was deleted.

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
3 changes: 3 additions & 0 deletions docker/dpcpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ARG IMPL_VERSION

FROM ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers-$IMPL_VERSION

# Make sure that apt is executed with root previlegies
USER root

RUN export DEBIAN_FRONTEND=noninteractive && \
apt update && \
apt install -y --no-install-recommends \
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
2 changes: 0 additions & 2 deletions oclmath/rounding_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ RoundingMode set_round(RoundingMode r, Type outType) {

int err = _controlfp_s(&oldRound, 0, 0); // get rounding mode into oldRound
if (err) {
vlog_error("\t\tERROR: -- cannot get rounding mode in %s:%d\n", __FILE__,
__LINE__);
return kDefaultRoundingMode; // what else never happens
}

Expand Down
5 changes: 0 additions & 5 deletions oclmath/rounding_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

#include "compat.h"

#if (defined(_WIN32) && defined(_MSC_VER))
#include "errorHelpers.h"
#include "testHarness.h"
#endif

typedef enum {
kDefaultRoundingMode = 0,
kRoundToNearestEven,
Expand Down
Loading

0 comments on commit ae02230

Please sign in to comment.