6

Interested in peoples opinions of Cuda vs openCL following NVidia's Cuda4 release.

I had originally gone with openCL since cross platform, open standards are a good thing(tm).
I assumed NVidia would fall into line as they had done with openGL.

But having talked to some NVidia people, they (naturaly) claim that they will concentrate on CUDA and openCL is hampered by having committees and having to please everyone - like openGL.
And with the new tools and libs in CUDA it's hard to argue with that.

-I'm in a fairly technical market so I can require the users to have particular HW.

Martin Beckett
  • 15,776
  • 3
  • 42
  • 69

3 Answers3

4

I have worked with both and found that CUDA is quite a bit more abstract, popular and supported than OpenCL. CUDA has it's own different version of C, it's on it's specific hardware and it's backed by a single company. Where OpenCL using a much closer-to-C language for their kernels and is backed by Apple, AMD, Intel, Nvidia and IBM.

When working with OpenCL I felt that it was much closer to what was being run on the device than with CUDA. For example, you have to build a separate kernel file at runtime for the specific device(s) (it can be precompiled). Also the management of the kernel is done in pure C, instead of CUDA where the kernel execution and kernel code is in the same syntax. Coming from a C background I felt more comfortable with OpenCL as it doesn't do anything "magic" for you, unlike CUDA which has predefined variables in each kernel and special kernel calling syntax.

I feel that even though OpenCL isn't as supported as CUDA currently, this should change in the future as more companies get on board. It'd be rather sad if one company controlled the solo GPGPU language.

Kendall Hopkins
  • 357
  • 2
  • 9
1

I would strongly suggest that if you can tell your customers the required hardwar that you stick to CUDA because:

-good tool support

-extremely good and fast librarys (cublas,cufft,...)

-good technical documentation

-support of ecc, double precision and some other nice stuff if you need it

And last but not least Nvidia supports CUDA developer extremely well.

moggi
  • 111
  • 4
0

If you can dictate hardware, then I would not eliminate CUDA as a consideration. If everyone who will use it will not only have nVidia, but also similarly aged hardware and drivers, then I would consider CUDA.

If you and your users have no problem being married to CUDA, then I would strongly consider it, as it seems from talk around GPGPU projects on the interwebs is that nVidia can be a very willing and eager partner.

On the other hand, if you want the utmost of flexability, stick with OpenCL.

Lastly, if you want to make some compromises, I would investigate DirectCompute platform, since that will probably provide, in general, the highest level of abstraction from any particular hardware or driver version (and gives some implementation language flexability), but will undoubtedly lock you out of non Windows and non recent Windows platforms.

JustinC
  • 3,306
  • 17
  • 20