OpenCL SDK Overview and Hardware Compatibility

I am a little confused by the general situation when it comes to developing OpenCL, so I will simply formulate my current understanding and questions as a list. Please correct me if I am wrong.

  • I know that there is an SDK ("Platform") from Intel, AMD (and I think there is OpenCL support in the Nvidia SDK?)

  • Are there any other vendor SDKs?

  • Will one vendor SDK support devices of another? e.g. Nvidia Devices with AMD sdk? I can run programs on my Intel processor using the AMD SDK.

  • Is it possible to install several platforms at once and process them at runtime?

Thanks!

0
source share
3 answers

1) Intel SDK offers OpenCL 1.2 support for processors and GPU devices (e.g. i7, HD4000, Xeon Phi, etc.), AMD SDK offers OpenCL 1.2 support for processors and GPU devices (e.g. Opteron, HD5xxx, HD6xxx, HD7xxx etc.), the NVIDIA SDK only offers OpenCL 1.1 support for GPUs (e.g. GTX 2xx, GTX 4xx, GTX 5xx, Tesla, etc.).

2) Yes, from Apple, ARM, etc.

3) Yes, thanks to the OpenCL ICD, you can compile the executable file on the NVIDIA SDK and run it on AMD hardware. However, you should be careful with versions of OpenCL, some problems may arise when compiling with the OpenCL 1.2 SDK and running on 1.1. platforms.

4) Yes, you can query OpenCL at runtime for a list of available platforms and use one or all of them. I use an Intel OpenCL CPU everyday device next to several AMD OpenCL GPUs.

+3
source

This is a duplicate of How to use the 2 OpenCL runtimes that were answered. Short answer: The SDK will just deliver the headers to you. Installed drivers provide platforms and devices. You can use all that are installed.

+2
source

The Intel OpenCL SDK supports OpenCL 1.2 for the processor, but only OpenCL 1.1 for Intel HD. Quoting their webpage "OpenCL 1.2 on a processor mixed with OpenCL 1.1 on Intelยฎ HD Graphics." However, drivers for Intel HD do not seem to be very good. It breaks down into most of the code that works on everything else.

The Nvidia SDK does not contain the C ++ binding file cl.hpp. You can copy it from another SDK or get it from the Hronos Group OpenCL website.

I had problems running OpenCL on devices without AMD with an AMD SDK, so instead I use the Intel SDK and it works on AMD, Intel and Nvidia. However, C ++ 1.1 bindings and 1.2 C ++ bindings are not 100% compatible. If you want your code to work on both Nvidia and AMD GPUS, use OpenCL 1.1, and this defines: #define CL_USE_DEPRECATED_OPENCL_1_1_APIS

0
source

Source: https://habr.com/ru/post/1482707/


All Articles