1

My objective is to obtain the ability of parallelizing a code in order to be able to run it on GPU, and the Graal would be to have a software that can run in parallel on any GPU or even CPU (Intel, NVIDIA, AMD, and so...).

From what I understood, the best solution would be to use OpenCL. But shortly after that, I also read about SYCL, that is supposed to simplify the codes that run on GPU.

But is it just that ? Isn't better to use a lower level language in order to be sure that it will be possible to be used in the most hardware possible ?

I know that all the compatibilities are listed on The Khronos Group website, but I am reading everything and its opposite on the Internet (like if a NVIDIA card supports CUDA, then it supports OpenCL, or NVIDIA cards will never work with OpenCL, even though OpenCL is supposed to work with everything)...

This is a new topic to me and there are lots of informations on the Internet... It would be great if someone could give me a simple answer to this question.

Balfar
  • 125
  • 7

1 Answers1

3

Probably yes.

OpenCL is supported on all AMD/Nvidia/Intel GPUs and on all Intel CPUs since around 2009. For best compatibility with almost any device, use OpenCL 1.2. The nice thing is that the OpenCL Runtime is included in the graphics drivers, so you don't have to install anything extra to work with it or to get it working on another machine.

SYCL on the other hand is newer and not yet established that well. For example, it is not officially supported (yet) on Nvidia GPUs: https://forums.developer.nvidia.com/t/is-sycl-available-on-cuda/37717/7 But there are already SYCL implememtations that are compatible with Nvidia/AMD GPUs, essentially built on top of CUDA or OpenCL 1.2, see here: https://stackoverflow.com/a/63468372/9178992

ProjectPhysX
  • 4,535
  • 2
  • 14
  • 34
  • 1
    Nitpick: "SYCL implememtations that are compatible with Nvidia/AMD GPUs, essentially built on top of OpenCL 1.2" -- that is not correct; neither hipSYCL nor oneAPI use OpenCL for AMD/NVIDIA hardware; oneAPI can use OpenCL for Intel devices, though. – aland Feb 11 '22 at 22:21
  • 2
    This is correct, the Nvidia and hip support in the SYCL DPC++/oneAPI and hipSYCL compilers convert to ptx and hip instructions in the same way as if the developer was using CUDA and hip. – Rod Burns Feb 14 '22 at 08:58