A comparison between OpenCL and CUDA
-
Community and programming support:
-
CUDA has some exclusive developing tools: CUDA Toolkit, NVIDIA GPU Computing SDK and NSight;
-
bunch of libries: cuFFT, cuBLAS, cuSPARSE, cuRAND, NPP, Thrust and a professional and reliable compiler NVCC. While on the other hand, only AMD provides a relatively stable OpenCL driver.
-
In short, CUDA has a better ecosystem and is easier to use and develop.
-
Generality and Popularity:
-
OpenCL is a cross platform project which has great generality.
-
many national laboratory use OpenCL to do the scientific calculation.
-
OpenCL has a Task-Parallel Execution Mode which overrules CUDA as CUDA only supports the parallelism of data.
-
In short, OpenCL is designed for all kinds of parallel computing, such as GPU, multi-core CPU, and other cell structures (so here the parallel computing is only part of OpenCL's capability), while CUDA is specific for NV GPU structure.(so parallel computing on NV graphic cards is all that CUDA can do).
-
Another thing is that NV card only supports OpenCL 1.2.
-
Performance:
-
While on NV graphic cards, of course CUDA has a better performance than OpenCL.
-
Market Share:
-
CUDA is now dominate in the main GPGPU market and most scientific calculation, bio research, financial analysis tasks are done with CUDA.(this is mainly due to the strong promotion by NVIDIA)
-
Programming difficulity:
-
CUDA is a well wrapped library, so the programmers don't need to know the hardware structure well to write CUDA programs. However OpenCL is a lower level function set, of a much better knowledge of the bottom design of the chips are required.
-
Some other things:
-
AMD and NV has different implementation of OpenCL, so generally we cannot expected the program would behave exactly the same on A card and N card. And since some of the differences are very corner and hard to notice, it will still be hard to tune the program of one system to another.
- AMD supports OpenCL 2.1 and NV supports OpenCL 1.2
General Informations online