24

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?

talonmies
  • 70,661
  • 34
  • 192
  • 269
jjcasmar
  • 1,387
  • 1
  • 18
  • 30
  • In the same boat. Also look at Vulkan, which should have a C++11 memory model, but otherwise quite hard to work with. https://www.khronos.org/blog/vulkan-has-just-become-the-worlds-first-graphics-api-with-a-formal-memory-model.-so-what-is-a-memory-model-and-why-should-i-care – Jan Nov 29 '22 at 16:05

2 Answers2

25

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.

Rod Burns
  • 2,104
  • 13
  • 24
  • 5
    More recently, Intel sponsored hipSYCL to work on features that will increase compatibility with DPC++ (eg SYCL 2020 USM). https://www.urz.uni-heidelberg.de/en/2020-09-29-oneapi-coe-urz – Jeff Hammond Oct 10 '20 at 20:28
-5

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.

Julius Baer
  • 61
  • 10
  • Thanks for your effort. However, I think this doesnt answer at all any of my questions... – jjcasmar Aug 17 '20 at 11:19
  • 1
    But OneAPI is from Intel. Mesa from Nouveau. SYCL and OpenCL from Khronos. You ask how it all fits together? I'm not saying this is the answer, but I don't have enough reputation to comment on your question. However, if you use the OneAPI installer from Intel, you will get further in understanding things. – Julius Baer Aug 17 '20 at 11:24
  • 1
    HIP is AMD's CUDA (or it was in the beginning, maybe it is now just porting CUDA code to AMD). OpenCL is like OpenGL, but for GPGPU instead of graphics. It had been implemented slowly by different hardware providers. It seemed to me that OpenCL is being dropped by Intel I think with OneAPI replacing it. Apple and Nvidia were already lagging in supporting OpenCL 2 I think. They each developed their own (CUDA, Metal) and there is also Vulkan. – Julius Baer Aug 17 '20 at 11:30
  • 1
    Your question will probably get down voted by vigilantes. They don't want these kinds of interesting questions here. – Julius Baer Aug 17 '20 at 11:42