OpenCL or CUDA Which way to go?

systemsfault picture systemsfault · Apr 15, 2010 · Viewed 7.9k times · Source

I'm investigating ways of using GPU in order to process streaming data. I had two choices but couldn't decide which way to go?

My criterias are as follows:

  1. Ease of use (good API)
  2. Community and Documentation
  3. Performance
  4. Future

I'll code in C and C++ under linux.

Answer

Kornel Kisielewicz picture Kornel Kisielewicz · Apr 15, 2010

OpenCL

  • interfaced from your production code
  • portable between different graphics hardware
  • limited operations but preprepared shortcuts

CUDA

  • separate language (CUDA C)
  • nVidia hardware only
  • almost full control over the code (coding in a C-like language)
  • lot of profiling and debugging tools

Bottom line -- OpenCL is portable, CUDA is nVidia only. However, being an independent language, CUDA is much more powerful and has a bunch of really good tools.

  1. Ease of use -- OpenCL is easier to use out of the box, but once you setup the CUDA coding environment it's almost like coding in C.
  2. Community and Documentation -- both have extensive documentation and examples, however I think CUDA has better.
  3. Performance -- CUDA allows for greater control, hence can be better fine-tuned for higher performance.
  4. Future -- hard to say really.