Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCL or CUDA Which way to go?

Tags:

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.

like image 622
systemsfault Avatar asked Apr 15 '10 12:04

systemsfault


People also ask

Which is better for rendering CUDA or OpenCL?

The general consensus is that if your app of choice supports both CUDA and OpenCL, go with CUDA as it will generate better performance results. The main reason for this is that Nvidia provide top quality support to app developers who choose to use CUDA acceleration, therefore the integration is always fantastic.

How much faster is CUDA than OpenCL?

A study that directly compared CUDA programs with OpenCL on NVIDIA GPUs showed that CUDA was 30% faster than OpenCL. OpenCL is rarely used for machine learning.

Can OpenCL run on NVIDIA GPU?

Using the OpenCL API, developers can launch compute kernels written using a limited subset of the C programming language on a GPU. In addition to OpenCL, NVIDIA supports a variety of GPU-accelerated libraries and high-level programming solutions that enable developers to get started quickly with GPU Computing.

Is CUDA faster than opengl?

If you have an Nvidia card, then use CUDA. It's considered faster than OpenCL much of the time.


1 Answers

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.
like image 132
Kornel Kisielewicz Avatar answered Oct 19 '22 04:10

Kornel Kisielewicz