Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

My personal experiences were:

  1. API: OpenCL has slightly more complex api. However most time you will spent with writing kernel code, and here both are almost identical.

  2. Community: CUDA has a much bigger community then OpenCL up til now, but this will probably about to even out.

  3. Documentation: Both are very well documented.

  4. Performance: We made the experience, that OpenCL drivers are not yet fully optimized.

  5. Future: The future lies with OpenCL as it is an open standard, not restricted to a vendor or specific hardware!

This assessment is from 2010, so probably out-dated.

OpenCL all the way unless you have a specific reason to use CUDA. OpenCL runs well on multicores like Intel i7 in addition to running on GPUs. By using OpenCL you can run it on a much wider range of hardware from Droid cell phones to the IBM Power7 compute nodes of the world's largest supercomputer, Blue Waters, which is supposed to come online next year.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top