What can we do with OpenCL?

I read about OpenCL, and I found this line:

OpenCL provides access to any application to the graphics processing module for non-graphical computing.

Suppose I need to perform an intensive processor operation or an algorithm in Java or Clojure (or even run Hadoop MapReduce), can I perform an operation on the GPU using OpenCL? if so, why would I do this?

If we have a processor, why use a GPU?

What are the OpenCL application scripts?

I read that OpenCL provides parallel programming, does this mean that it will split the target task into a processor and a GPU? or just through one GPU?

+4
source share
3 answers

OpenCL provides a portable interface for programming on parallel machines. OpenCL programs can run on a processor or on a GPU. I have not seen a technology that will run code for both the CPU and GPU immediately.

Using GPUs for general purposes takes advantage of the fact that GPUs are actually built from hundreds or even thousands of simple, small processing elements (PEs). For some tasks, this architecture can complete the task in a fraction of the time required by the CPU.

One of the drawbacks of GPUs is that they are really mutant SIMD (Single Instruction Multiple Data) machines; thus, large groups of PEs are limited to perform the same operation at the same time, but on different data. This limitation makes program development a little more difficult.

GPUs are very good for any task that can be parallelized without requiring a lot of communication between different threads. Technologies such as NVIDIA CUDA and OpenCL have begun to see significant amounts of use in scientific applications and high-performance computing, both of which use parallelism quite heavily.

+7
source

OpenCL was developed after a scientist discovered that the GPU architecture is capable of performing linear algebra calculations very efficiently.

The problems of linear algebra, as a rule, are very easily parallelized and quite simple on single elements. In most vector and matrix operations, only four basic mathematical functions +, -, / and * are needed. In addition, some comparisons for finding Max and Min and one can do a great job in a parallel environment. If the size of the problem is large enough that the extra time it takes to copy data from RAM to the GPU and vice versa is much less than increasing the speed of the GPU, greater productivity increases.

Methods have been developed since. The first calculations were performed by converting problems into graphic tasks and vice versa. OpenCL was designed to provide a clean interface for calculations.

OpenCL is suitable for problems that can run in parallel without too many dependencies and that require more processing power. Linear algebra, search algorithms, signal conversion and 3D scenes, and call checking are classic examples.

+5
source

Intel is certainly less enthusiastic about openCL. I don’t think I can install drivers on my Linux system, they made it so inconvenient. Other technologies exist, such as Texas Instruments digital signal processing chips. I would use openCL if I could. However, there are some advantages to using, say, a cluster of cheap ARM boards for quite a few applications. Ease of programming is very important, not something hypothetically there, but never used.

0
source

All Articles