Understanding oneAPI and SYCL in AMD GPU

5.2k Views Asked by At

I am a GPGPU developer and I have done all my work using CUDA. Lately I have acquired an AMD GPU for my home setup and I have been reading about SYCL and oneAPI but I'm not sure I understand what each of those are, how they complement. If I have understood things correctly, SYCL is a standard developed by Khronos that allows to create parallel software in C++. It requires a custom toolchain, provided by the SYCL implementation and there exists several implementations.

On the other hand, oneAPI is an implementation of SYCL with some extra extensions (which could be added to SYCL standard in the future) and some libraries with typical parallel libraries, right?

Since I have an AMD GPU, I want to use it to do some GPGPU, but the ecosystem is a bit scary. We have mesa drivers, AMD drivers, different openCL implementations, HIP... How is all this suppose to fit together?

2

There are 2 best solutions below

1
Rod Burns On BEST ANSWER

SYCL - This is an open standard from Khronos, effectively it defines an interface for developers to program heterogeneous architectures that include GPUs and other high performance processors. There are several SYCL implementations (listed here) and the beauty is that you can write code using SYCL and it will work across the different compiler implementations meaning you can target a wide range of processors. This diagram is quite useful in showing these and what hardware they support. Each implementation will guide you about what drivers you will need.

oneAPI - This is an intiative being led by Intel that, amongst other things, includes DPC++, one of the SYCL implementations. You can use this with Intel processors and there is also support for Nvidia GPUs and experimental support for AMD GPUS.

If you have AMD hardware, I would also suggest exploring the hipSYCL implementation which uses hip to offload parallel instructions to AMD processors.

Ultimately all of this just uses SYCL code, and some implementations have added specific extensions that will either end up in the next version of the SYCL specification or have been designed for specific features on specific hardware.

4
Julius Baer On

You can download the One API installer from Intel. It will guide you. For example, it will tell you you need compute drivers for your Integrated Graphics. And it can install the Intel oneAPI DPC++ Compiler which uses sycl.dll, a fairly small library. I didn't know that SYCL is a standard, I was just using the DLL in a PyTorch project with the C++ API. It's interesting how you mention AMD then, with all this Intell software. MESA is an Open Source variant for NVIDIA cards afaik.