views:

676

answers:

4
+12  Q: 

OpenCL and CUDA

Should i learn OpenCL if i only want to program NVIDIA GPUs ?

+10  A: 

OpenCL is still in its infancy, but if you plan to work with GPUs and many-cored devices in general in the long term then it's probably a good idea to start looking at it now, even if you don't use it for any real-world projects yet. Its main advantage over CUDA is that it is cross-platform (although you probably will still need to get into device-specific optimisations if you want to push performance to the max).

CUDA on the other hand is much more mature, but of course is vendor-specific. It has better tools, better performance (for now) and there's a lot more sample code, tools, documentation and utilities available. If you have an actual GPU project that you need to work on in the in short term and you can be certain that you only need to support high end nVidia hardware then CUDA is the way to go. The skills and knowledge you develop while working with CUDA will mostly be transferrable to CUDA later if needed.

Paul R
+3  A: 

The main benefit of OpenCL is the portability but if you're only developing for NVIDIA then I would use CUDA C since it has a simpler API and more recent hardware features can be exploited, whereas because OpenCL is a standard all changes have to go through a slower review process. The tools (including debuggers for example) are also far more advanced at the moment.

Having said that, it doesn't actually matter which you learn - the fundamental principle behind both is data parallel programming and if you learn one then it is mostly a case of learning new syntax to switch to the other.

Tom
+3  A: 

Not sure exactly what your position is, but I am currently going through a world of pain trying get useful support out of NVidia / Silicon Mechanics. Using OpenCL gives me an exit route to comparable hardware (Tesla v Firestream 9270). Being able to move between vendors has its advantages.

andrew cooke
A: 

Well I think you have to your parallel programming course instructor FA :)

ziad elrahbeni
akbar ta7iye la abouzouz
scatman
@scatman: What does your comment mean in English?
Andrew Grimm