![SYCL CPU Device](../common-revealjs/images/sycl_implementation_cpu.svg "SYCL-CPU-Device")
* There is no Host Device in SYCL (as of SYCL 2020)
* SYCL 1.2.1 had a concept of a 'magical' host device - an emulated backend
* SYCL 2020 implementations generally offer a CPU device
* Often, the best debugging on a platform is using a CPU device
* Yet, debugging off the CPU is important to discover offloading issues
#### What a SYCL implementation looks like
![SYCL Backend](../common-revealjs/images/sycl_implementation_backend.svg "SYCL-Backend")
* The back-end interface is where the SYCL runtime calls down into a back-end in order to execute on a particular device
* Many implementations provide OpenCL backends, but some provide additional or different backends.
#### What a SYCL implementation looks like
![SYCL Compiler](../common-revealjs/images/sycl_implementation_compiler.svg "SYCL-Compiler")
* The SYCL device compiler is a C++ compiler which can identify SYCL kernels and compile them down to an IR or ISA
* This can be SPIR, SPIR-V, GCN, PTX or any proprietary vendor ISA
* Some SYCL implementations are library only in
which case they do not require a device compiler
**IR** = Intermediate Representation **ISA** = Instruction Set Architecture
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_1.png "SYCL")
* This is the typical compilation model for a C++ source file.
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_2.png "SYCL")
* So how do you compile a source file to also target the GPU?
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_3.png "SYCL")
* As SYCL is single source the kernel functions are standard C++ function objects or lambda expressions.
* These are defined by submitting them to specific APIs.
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_4.png "SYCL")
* As well as the standard C++ compiler, the source file is also compiled by a SYCL device compiler.
* This produces a device IR such as SPIR, SPIR-V or PTX or ISA for a specific architecture containing the GPU code.
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_5.png "SYCL")
* The CPU object is then linked with the device IR or ISA to form a single executable with both the CPU and GPU code.
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_5.png "SYCL")
* This is the multi-compiler compilation model.
* This allows the host compiler (MSVC, clang, icx, gcc) to be independent of the SYCL device compiler.
#### Std C++ compilation model
![SYCL Backend](../common-revealjs/images/compilation_6.png "SYCL")
* SYCL also supports a single-compiler compilation model.
* Where both the host compiler and SYCL device compiler are invoked from the same driver.
## Where to Get Started with SYCL
* Visit https://sycl.tech to find out about all the SYCL book, implementations, tutorials, news, and videos
* Visit https://www.khronos.org/sycl/ to find the latest SYCL specifications
* Checkout the documentation provided with one of the SYCL implementations.
#### Exercise
Code_Exercises/What_is_SYCL/source
Configure your environment for using SYCL and compile a source file with the SYCL compiler.