I have been reading about OpenCL and I found this line:
OpenCL gives any application access to the Graphics Processing Unit for non-graphical computing.
Lets say I need to execute a a CPU intensive operation or an algorithm in Java or Clojure (or even maybe running Hadoop MapReduce), could I execute the operation in GPU using OpenCL? if yes, why I would do that?
If we have CPU, why to use GPU?
What are the scenarios of OpenCL applications?
I read that OpenCL provides parallel programming, does this mean it will partition a target job across the CPU and the GPU? or across the GPU alone?
OpenCL provides a portable interface for programming on parallel machines. OpenCL programs can be run on the CPU or the GPU. I've not seen technology that will run the code across both the CPU and the GPU at once.
Use of GPUs for general purpose computing leverages the fact that GPUs are actually built from hundreds or even thousands of simple, small processing elements (PEs). For some tasks, this architecture may be able to complete the task in a fraction of the time required by the CPU.
One drawback of GPUs is that they are really mutant SIMD (Single Instruction Multiple Data) machines; thus large groups of the PEs are constrained to be executing the same operation at the same time, but on different data. This constraint makes designing the program a little bit more difficult.
GPUs are very good for any task that can be parallelized without requiring much communication between different threads. Technologies like NVIDIAs CUDA and OpenCL have begun to see significant amounts of use in scientific applications and High-Performance Computing, both of which exploit parallelism rather heavily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With