Welcome back to the oneAPI channel.​
Last video we talked about accelerators, and why we need them​
And some of the challenges to program heterogeneous systems
oneAPI offers multiple ways to handle heterogenous, parallel programming,
oneAPI offers multiple ways to handle heterogenous, parallel programming, ​
Like libraries that can work on multiple devices and on multiple vendors.. ​
Same library functions that can run on CPU and GPU, Intel, AMD nVidia or others
But here we are talking about direct programming​
​ So what is SYCL?​
How does it related to DPC++​
And why do we even care?​
Well, SYCL is an industry programming model​
driven by the Khronos group and many contributors from the industry and academia​
On the web site you’ll find the specifications and many resources ​
​ And this is a current map of SYCL implementation​
If you have you code implemented in SYCL​
You can get it to work on intel CPUs, GPUs and FPGA​
But also on AMD GPUs, ARM, nVidia and others ​
And there are many compilers provided by universities, and companies like Xilinx,
CodePlay or Intel​
Intel compiler implementing SYCL is called DPC++ and is part of oneAPI​
What is SYCL​
SYCL SW Stack (DPC++, DPPY)​ ​
SYCL is open and supported by a range of devices and vendors, ​
so porting your SYCL code from one vendor to the other ​
from one architecture to the other is possible ​
SYCL 2020 is based on Modern C++ 17​
The syntax is simple, no pragmas, no attributes ​
the interface is basically a C++ template library and it’s the same
interface for host and device code
So you have a single code for the host and for the device..
​
If a regular flow of a C++ program looks like that​
When we have to handle the C++ device code as well, ​
we need to identify it,, compile it to the specific target device Instruction set
using the right back-end, which could be oneAPI level zero, or OpenCL, or nVidia PTX or other​
​
And we need to add the management code to the host.​
There are multiple compiler architectures that can handle it, here is just one example..​
The result is code for the host,
CPU in this example and compiled code for the device, GPU in this example
​
So a SYCL application is standard C++ code augmented
with constructs that can be implemented as a C++ library.​
In a very high level SYCL Adds 2 main types of capabilities to C++​
The first is the device awareness, ​
So you can discover which devices are connected to your system, and what are their properties.​
And the second is the ability to submit work and exchange data with these devices​
First you want to be able to choose what portion of the code to run on each of the devices..​
Well usually most of the code run on the host, and the devices are running kernels​
that they usually were designed to run faster or more efficiently than the host​
And then you want to control the execution flow,
synchronize the execution across the host and device​
And efficiently mange the data exchanges using buffers or shared memory​
We will talk more about that in the next videos..
Next video, we’ll talk about device awareness capabilities​
And we’ll see few examples, ​
See you there​