SYCL 2020 Feature Support
This document details the new features available in the SYCL 2020 specification and whether they are supported in ComputeCpp. The table below indicates if a feature is supported and if it is, what version of ComputeCpp it is supported in. The table may also include notes about the implementation of the feature to be aware of.
Table 1. Support Matrix
Feature | Supported Version | Comments |
---|---|---|
Accessors: Deduction guides (CTAD) | 2.5.0 | |
Accessors: Split into separate types | 2.6.0 (partial) | Only host_accessor and local_accessor |
Accessors: Access mode and target simplifications | 2.8.0 | |
Accessors: All device accessors can be placeholders | - | |
Accessors: Default template parameters | 2.5.0 | |
Accessors: get_pointer and get_multi_ptr changes |
- | |
Accessors: Reading outside accessor range is UB | 2.8.0 | |
Accessors: accessor::operator[](0) indexes into start of range |
2.8.0 | |
Accessors: const T and read_only behavior |
- | |
Accessors: operator [] returns const ref in read mode |
2.3.0 | |
Address space – inference, generics, decorated | - | |
atomic_ref replacement for atomic class |
2.7.0 (partial) | Host only |
Backend interop: backend_traits |
2.6.0 (partial) | Images not supported |
Backend interop: get_backend |
2.2.0 | |
buffer : Contiguous container constructor |
2.4.0 | |
buffer : Default access target is device accessor |
2.8.0 | |
buffer : New constructor from shared_ptr<T[]> |
- | |
buffer : Reinterpret without a range |
2.0.0 | |
buffer_allocator templated on the data type |
- | |
buffer_allocator is a C++ Allocator |
- | |
Builtins: ctz and clz |
- | |
byte_size , size replace get_size , get_count |
2.5.0 | |
C++17 by default | - | |
Deduction guides | 2.5.0 | |
Default constructed device and platform changes |
- | |
device_copyable type trait |
- | |
Device accessors as reversible containers | 2.8.0 (partial) | Non-reversible containers fully supported, reversible only for contiguous |
Device aspects | 2.7.0 | |
Exception: Derives from std::exception | - | |
Exception: Removal of exception hierarchy and adding error codes | 2.7.0 (partial) | Error codes thrown in most places |
Explicit dependencies (depends_on() ) |
2.0.0 | |
Extension mechanism - feature test macros | 2.7.0 | Only for new features/extensions |
Extension namespaces | - | |
Group Algorithms (work-group) | 2.2.0 (partial) | |
Group algorithms (Sub-group) | 2.2.0 (partial) | |
handler::require can be called on any accessor |
- | |
Host accessors as reversible containers | 2.8.0 (partial) | Non-reversible containers fully supported, reversible only for contiguous |
Host task with interop_handle |
2.6.0 | |
Host task accessors | 2.8.0 (partial) | Missing deduction guides |
Images - sampled_image , unsampled_image |
- | |
Immutable Kernels | - | |
In-order queues | 2.2.0 | |
info::kernel_device_specific queries |
- | |
Information query descriptors as structs | - | |
kernel_bundle |
- | |
Kernel Function type attributes | - | |
Math array (marray ) |
- | |
multi_ptr changes |
- | |
New device selector API | 2.6.0 | |
aspect_selector |
2.5.0 | |
New header file name (sycl/sycl.hpp ) |
2.5.0 | |
New property traits and classes that support properties | 2.6.0 | |
New attribute style | - | |
New operations for id and range classes |
2.8.0 | |
Optional Lambda name | 2.8.0 | |
Unnamed types in kernel names | - | |
Parallel_for simplifications | 2.7.0 (partial) | Missing 2D and 3D range simplifications |
Queue: Constructors taking device + context |
2.0.0 | |
Queue: Explicit copy shortcuts | - | |
Queue: Kernel shortcuts | 2.2.0 | |
Queue: USM memory shortcuts | 2.7.0 | Added memset in 2.7.0 |
Reductions | 2.8.0 (partial) | Missing array reductions |
Remove buffer API for unique_ptr |
- | |
Remove nd_item::barrier() |
- | |
Remove OpenCL types (cl_int etc.) |
- | |
Replace mem_fence with atomic_fence |
- | |
Required work-group size | - | |
Specialization Constants | - | |
Support relaxed Standard layout | - | |
Sub-groups | 2.2.0 | |
sycl::bit_cast |
2.7.0 | |
sycl::span |
2.8.0 | |
Templated max_work_item_sizes query |
- | |
Terminate in default async_handler | 2.2.0 | |
vec additions: operator[] , unary +, - |
2.8.0 | |
Unified Shared Memory | 2.7.0 (partial) | Explicit USM supported by experimental compiler |