GPU programming

I want to make some GPUs. Which way here? I want to learn something "open", a cross-platform and a "higher" language. I do not want to be blocked only by the developer of the GPU or OS, platform, etc.

What is my choice? Cuda, OpenCL, OpenMP, more? What are the pros / cons for them?

What about G / HLSL and PhysX?

I look at "general purpose" programming, some math, crunching numbers, modeling, etc. Perhaps it will spit out pretty pretty graphics, but not specifically graphic programming.

+4
source share
6 answers

OpenMP is just a processor, but easy to implement, CUDA is basically just a graphics processor. Ati Stream supports both, but only on Ati / AMD gpu. OpenCL is your only "open" option that supports both.

+4
source

The answer marked correctly is now outdated and incorrect. In particular, OpenMP 4.0 supports GPU acceleration.

+9
source

Currently - 2013/2014 - C ++ Microsoft Accelerated Mass Parallelism (AMP) . This is a high-level language that compiles to the High Shader Language (HLSL), so you do not need to write kernel code, etc.

A simple and easy to read comparison of OpenCL and C ++ AMP is done by AMD people and is here (click!) .

+1
source

GPU support for openMP will be available in the near future:

http://openmp.org/sc14/Booth-Sam-IBM.pdf

+1
source

If you want to connect to the GPU at a higher level than OpenCL, you can take a look at Matlab. It is possible to program GPUs through Matlab, and you do not need to study lower models such as OpenCL and CUDA. CUDA will be more efficient since you are probably planning to program an NVIDIA card. However, openCL is the standard for GPGPU, and the encoding method is pretty similar. Although you may find it not very difficult to use CUDA or openCL, it will be much more difficult for you to optimize them.

Hope this helps.

0
source

Open CL is open, but I heard that the disadvantage of this is the lack of documentation. ATI could be better between NVIDIA and ATI, as it was reportedly faster in 2009, but I'm not sure that these statistics are still correct.

0
source

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


All Articles