Intel OpenCL Vs. Khronos OpenCL

What is the difference between Intel, AMD and Hronos OpenCLs. I am completely new to OpenCL and want to start with it. I do not know which one is better to install on my operating system.

+5
source share
3 answers

OpenCL is an “extension” in C and C ++ that allows you to parallelize software on your computing devices: CPU, GPU, etc.

OpenCL is defined by a standard ( created by the Khronos Group ) and implemented by equipment suppliers Intel, AMD, nVidia, etc. . Therefore, for each OpenCL implementation, a special OpenCL driver for the provider is required, which will allow the vendor to use hardware.

So, if you have an Intel-based system, use Intel OpenCL , because that’s the only way you can use all the computing devices on your computer. The same thing happens if you have an AMD system. Also, note that there is no Khronos OpenCL implementation.

Of course, you may have a platform with devices that support OpenCL from several vendors (for example, Intel CPU + GPU and discrete nVidia card). In this case, the OpenCL environment contains a general level (dynamically loaded library). This layer is the interface that invokes the implementations provided in each device driver, depending on the OpenCL platform chosen.

+9
source

OpenCL is a standard defined by Kronos. They distribute header files that you must provide to your compiler. They do not distribute referenced binaries. To do this, you must get ICD (Installable Client Driver), on Windows it will be in the form of a DLL file. You will get it from installing one or more ...

Don’t worry about compiling with one provider, and it doesn’t work on another; OpenCL has been carefully designed to get around this. Compiling with any version that you have, it will work with any other version that will be the same or new, regardless of who made it.

Be careful , the AMD OpenCL driver will work as the OpenCL driver for Intel processors. If, for example, you have an AMD graphics processor and an Intel processor and the Intel OpenCL driver for AMD OpenCL is installed, the AMD driver will report that it can provide both a GPU device and a CPU (your processor), and the Intel driver will inform you about the processor (and your processor) and, most likely, also a GPU device (the graphics processor that is on the Intel processor, for example, on the i7-3770, it will be an HD4000). If you blindly ask OpenCL "All available processors", you will get AMD drivers and Intel drivers offering you the same CPU. In this case, your code will not work very well.

On Windows, it is expected that you download the header files yourself, and then either create the library from the DLL (MSVC) or directly reference the DLL (the default behavior of Mingw and Clang).

On Linux, the package manager will most likely have a library to communicate with, see the distribution documentation for this. On Ubuntu and Debian, this command will work ...

sudo apt-get install ocl-icd-opencl-dev 

There is nothing to install on a Mac, and trying to install something may damage your system. Just install Xcode and use the OpenCL framework.

There are other platforms, such as Android. Some FPGA vendors offer OpenCL libraries. Refer to your vendor documentation.

+1
source

Khronos defines the OpenCL standard. Each vendor / open source implements these standards.

Khronos defines the set of compliance tests that must pass if the vendor claims that its opencl implementation is compliant.

0
source

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


All Articles