What is a host in opencl?

Now I started to study openCL. I am doing a tutorial now, but I canโ€™t understand that the idea of โ€‹โ€‹a host can be explained by someone. Thanks.

+6
source share
1 answer

OpenCL is a system designed to support large-scale parallel processing, for example, using modern graphics chips (GPUs). In the OpenCL paradigm, a โ€œhost programโ€ is an external control logic that configures a GPU-based application. Typically, this host program will run on a general-purpose central processor (such as the main x86-based processor on most desktop PCs). The OpenCL program also contains one or more kernel functions that are designed to run in parallel on the GPU.

After setting up all the buffers and cores, the host program will call something like

EnqueueNDRangeKernel() 

which will start the execution of the kernel on the GPU.

Depending on your target platform, things may be a little different. For example, OpenCL does not specifically require a graphics processor. Instead, the kernel can execute as multiple threads on a single processor that runs the host program.

Summary of OpenCL Nomenclature:

  • Host - the main processor used to configure kernel execution
  • A device is a component that contains the processing units that the kernel (GPU) will execute.
+6
source

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


All Articles