HOME

TheInfoList



OR:

SYCL is a higher-level programming model to improve programming productivity on various
hardware accelerators Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcul ...
. It is a single-source embedded domain-specific language (
eDSL A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging f ...
) based on pure
C++17 C++17 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++17 replaced the prior version of the C++ standard, called C++14, and was later replaced by C++20. History Before the C++ Standards Committee fixed a 3-year rel ...
. It is a standard developed by
Khronos Group The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation ...
, announced in March 2014.


Origin of the name

SYCL (pronounced ‘sickle’) is a name and not an
acronym An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in ''NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, as ...
. In particular, SYCL developers made clear that the name contains no reference to
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
.


Purpose

SYCL is a royalty-free, cross-platform abstraction layer that builds on the underlying concepts, portability and efficiency inspired by
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
that enables code for heterogeneous processors to be written in a “single-source” style using completely standard
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
. SYCL enables single-source development where
C++ template Templates are a feature of the C++ programming language that allows functions and classes to operate with generic types. This allows a function or class to work on many different data types without being rewritten for each one. The C++ Standa ...
functions can contain both host and device code to construct complex algorithms that use
hardware accelerators Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcul ...
, and then re-use them throughout their source code on different types of data. While the SYCL standard started as the higher-level programming model sub-group of the
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
working group and was originally developed for use with
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
and SPIR, SYCL is a
Khronos Group The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation ...
workgroup independent from the
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
working group since September 20, 2019 and starting with SYCL 2020, SYCL has been generalized as a more general heterogeneous framework able to target other systems. This is now possible with the concept of a generic backend to target any acceleration
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
while enabling full interoperability with the target
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
, like using existing native libraries to reach the maximum performance along with simplifying the programming effort. For example, the hipSYCL implementation targets ROCm and
CUDA CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ...
via
AMD Advanced Micro Devices, Inc. (AMD) is an American multinational semiconductor company based in Santa Clara, California, that develops computer processors and related technologies for business and consumer markets. While it initially manufactur ...
's cross-vendor HIP.


Versions

SYCL was introduced at GDC in March 2014 with provisional version 1.2, then the SYCL 1.2 final version was introduced at
IWOCL The International Workshop on OpenCL (IWOCL – "eye-wok-ul") is an annual conference that brings together the community of OpenCL users, researchers, developers and suppliers to share OpenCL best practices and help advance the use of the Khronos ...
2015 in May 2015. The latest version for the previous SYCL 1.2.1 series is SYCL 1.2.1 revision 7 which was published on April 27, 2020 (the first version was published on December 6, 2017). SYCL 2.2 provisional was introduced at
IWOCL The International Workshop on OpenCL (IWOCL – "eye-wok-ul") is an annual conference that brings together the community of OpenCL users, researchers, developers and suppliers to share OpenCL best practices and help advance the use of the Khronos ...
2016 in May 2016 targeting
C++14 C++14 is a version of the ISO/IEC 14882 standard for the C++ programming language. It is intended to be a small extension over C++11, featuring mainly bug fixes and small improvements, and was replaced by C++17. Its approval was announced on Augus ...
and
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
2.2. But the SYCL committee preferred not to finalize this version and to move towards a more flexible SYCL specification to address the increasing diversity of current
hardware accelerators Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcul ...
, including
artificial intelligence Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech re ...
engines, which led to SYCL 2020. The latest version is SYCL 2020 revision 6 which was published on November 13, 2022, an evolution from first release of revision 2 which was published on February 9, 2021, taking into account the feedback from users and implementors on the SYCL 2020 Provisional Specification revision 1 published on June 30, 2020. C++17 and OpenCL 3.0 support are main targets of this release. Unified shared memory (USM) is one main feature for GPUs with OpenCL and CUDA support. At IWOCL 2021 a roadmap was presented. DPC++, ComputeCpp, hipSYCL, triSYCL and neoSYCL are the main implementations of SYCL. Next Target in development is support of C++20 in future SYCL 202x.


Implementations

* DPC++: (data parallel C++) is an open source project of Intel to introduce SYCL for LLVM and oneAPI. C++17 and parts of C++20 with SYCL 2020 are base of this Compiler framework. * ComputeCpp: SYCL 1.2.1 conformant framework of firm Codeplay with community version * hipSYCL: incomplete 1.2.1 support without OpenCL coupling and images, partly SYCL 2020, supports ROCm (AMD), CUDA (Nvidia), OpenMP (CPUs) and Level Zero (Intel). Actual Version is 0.9.1 in March 2021. * triSYCL: based on C++20, OpenMP and OpenCL, slow development, incomplete, with a version based on top of DPC++ * neoSYCL: SYCL 1.2.1 nearly complete, for hpc SX-Aurora Tsubasa, no OpenCL specific features like image support * SYCL-gtx: C++11 support, for OpenCL 1.2+, far from complete, no actual development * Sylkan is an implementation of SYCL to Vulkan devices in an experimental state. * Polygeist has a fork compiling SYCL through MLIR which is backed by the Inteon company.


Software

* Gromacs: SYCL 2020 is Part of Gromacs Version 2021. * use in automotive Industrie for autonomous driving with support of
ISO 26262 ISO 26262, titled "Road vehicles – Functional safety", is an international standard for functional safety of electrical and/or electronic systems that are installed in serial production road vehicles (excluding mopeds), defined by the Interna ...
.


Tutorials

There are a few tutorials in the ComputeCpp SYCL guides.


License

The source files for building the specification, such as Makefiles and some scripts, the SYCL headers and the SYCL code samples are under the Apache 2.0 license. Details of the license are at: https://www.apache.org/licenses/LICENSE-2.0.html


Comparison with other APIs

The open standards SYCL and
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
are similar to the programming models of the proprietary stack
CUDA CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ...
from
Nvidia Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
, and
HIP In vertebrate anatomy, hip (or "coxa"Latin ''coxa'' was used by Celsus in the sense "hip", but by Pliny the Elder in the sense "hip bone" (Diab, p 77) in medical terminology) refers to either an anatomical region or a joint. The hip region is ...
from the open-source stack
ROCm ROCm is an Advanced Micro Devices (AMD) software stack for graphics processing unit (GPU) programming. ROCm spans several domains: general-purpose computing on graphics processing units (GPGPU), high performance computing (HPC), heterogeneous ...
, supported by
AMD Advanced Micro Devices, Inc. (AMD) is an American multinational semiconductor company based in Santa Clara, California, that develops computer processors and related technologies for business and consumer markets. While it initially manufactur ...
. In the
Khronos Group The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation ...
realm,
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
and
Vulkan Vulkan is a low- overhead, cross-platform API, open standard for 3D graphics and computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulkan is intended to offer higher perfor ...
are the low-level ''non-single source''
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
and SYCL is the high-level ''single-source''
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
embedded domain-specific language A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging ...
(eDSL).


CUDA

By comparison, the ''single-source''
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
embedded domain-specific language A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging ...
version of CUDA, which is actually named "CUDA ''Runtime''
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
", is somewhat similar to SYCL. But there is actually a less known ''non single-source'' version of CUDA which is called "CUDA ''Driver''
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
", similar to
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
, and used for example by the CUDA ''Runtime''
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
implementation itself. SYCL extends the
C++ AMP C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''. History "C" ...
features relieving the programmer from explicitly transferring the data between the host and devices by using ''buffers'' and ''accessors'', by opposition to CUDA (before the introduction of ''Unified Memory'' in CUDA 6). But starting with SYCL 2020, it is also possible to use USM instead of ''buffers'' and ''accessors'' to use a lower-level programming model similar to ''Unified Memory'' in CUDA. SYCL is higher-level than C++ AMP and CUDA since you do not need to build an explicit dependency graph between all the kernels, and provides you automatic asynchronous scheduling of the kernels with communication and computation overlap. This is all done by using the concept of accessors, without requiring any compiler support. Unlike C++ AMP and CUDA, SYCL is a pure C++ eDSL without any C++ extension, allowing a basic CPU implementation relying on pure runtime without any specific compiler. This is very useful for debugging an application or for prototyping for a new architecture without having the architecture and compiler available yet. There are at least 3 known SYCL implementations targeting the CUDA backend.


ROCm HIP

ROCm HIP can be seen as a clone of CUDA targeting Nvidia GPU, AMD GPU and x86 CPU. Thus ROCm HIP is a lower-level API compared to SYCL and most of the comments mentioned in the comparison with CUDA do apply. ROCm HIP has some similarities to SYCL in the sense that it can target various vendors (AMD and Nvidia) and accelerator types (GPU and CPU). But SYCL can target according to the implementation any type of accelerators and any vendors, potentially at the same time, in a single application with the concept of backend. SYCL is also pure C++ while HIP uses some extensions inherited from CUDA, which prevents using a normal C++ compiler to target any CPU. There are at least 2 known implementations of SYCL targeting the HIP backend, oneAPI DPC++ and hipSYCL. Th
hipSYCL
implementation, over HIP, adds SYCL programming to CUDA and HIP.


Other programming models

SYCL has many similarities to the Kokkos programming model, including the use of opaque multi-dimensional array objects (SYCL buffers and Kokkos arrays), multi-dimensional ranges for parallel execution, and reductions (added in SYCL 2020). Numerous features in SYCL 2020 were added in response to feedback from the Kokkos community.


See also

*
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
*
OpenACC OpenACC (for ''open accelerators'') is a programming standard for parallel computing developed by Cray, CAPS, Nvidia and PGI. The standard is designed to simplify parallel programming of heterogeneous CPU/GPU systems. As in OpenMP, the programme ...
*
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
*
OpenMP OpenMP (Open Multi-Processing) is an application programming interface (API) that supports multi-platform shared-memory multiprocessing programming in C, C++, and Fortran, on many platforms, instruction-set architectures and operating syste ...
* SPIR *
Vulkan Vulkan is a low- overhead, cross-platform API, open standard for 3D graphics and computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulkan is intended to offer higher perfor ...
*
C++ AMP C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''. History "C" ...
*
CUDA CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ...
*
ROCm ROCm is an Advanced Micro Devices (AMD) software stack for graphics processing unit (GPU) programming. ROCm spans several domains: general-purpose computing on graphics processing units (GPGPU), high performance computing (HPC), heterogeneous ...
*
Metal A metal (from Greek μέταλλον ''métallon'', "mine, quarry, metal") is a material that, when freshly prepared, polished, or fractured, shows a lustrous appearance, and conducts electricity and heat relatively well. Metals are typicall ...


References


External links


Khronos SYCL webpage

The SYCL specifications in Khronos registry

C++17 ParallelSTL in SYCL

SYCL tech resources

Codeplay ComputeCpp SYCL implementation

Implementation of SYCL started by Intel with the goal of Clang/LLVM up-streaming

hipSYCL: implementation of SYCL 1.2.1 over AMD HIP/NVIDIA CUDA

triSYCL open-source SYCL implementation

SYCL Conference @ IWOCL

"SYCL 2020 Launches with New Name, New Features, and High Ambition", HPCWire article (2021 Feb. 9th)

James Reinders, Ben Ashbaugh, James Brodman, Michael Kinsner, John Pennycook, Xinmin Tian: "Data Parallel C++: Mastering DPC++ for Programming of Heterogeneous Systems using C++ and SYCL", Apress (2021), OpenAccess.
{{Parallel computing Application programming interfaces C++ Cross-platform software Domain-specific programming languages GPGPU
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
Heterogeneous computing Parallel computing