Page 1 of 1

OpenCL vs. CUDA

Posted: Tue Jul 06, 2010 10:08 am
by Jan Bender
Hi,

I want to parallelize my simulation method for the GPU. Now I wonder, if it is better to start with CUDA or if I use OpenCL.

Can anybody tell me where are the advantages of CUDA and OpenCL?

Cheers,

Jan

Re: OpenCL vs. CUDA

Posted: Wed Jul 21, 2010 12:50 am
by projectileman
Hi.

On NVIDIA cards, OpenCL has nearly the same performance as CUDA. But OpenCL has more advantages in portability and it offers better integration, extensionality and modularity in software projects, because it could load and compile kernel code at runtime.

Also, OpenCL is supported in more hardware platforms, either GPU-based or not, taking advantage of the available processing power in the machine. ATI cards (since 5xxx series) offers OpenCL support too.

.

Re: OpenCL vs. CUDA

Posted: Wed Jul 21, 2010 12:20 pm
by Jan Bender
Hi,
Also, OpenCL is supported in more hardware platforms, either GPU-based or not, taking advantage of the available processing power in the machine. ATI cards (since 5xxx series) offers OpenCL support too.
I think the support of different platform types is only interesting in theory. If a program is optimized for GPU, it will not be optimized at the same time for multi-core platforms.

Jan

Re: OpenCL vs. CUDA

Posted: Wed Jul 21, 2010 9:07 pm
by Erwin Coumans
Jan Bender wrote: I think the support of different platform types is only interesting in theory. If a program is optimized for GPU, it will not be optimized at the same time for multi-core platforms.
Jan
That is not necessarily true: it is possible to create an OpenCL program optimized for GPU that also runs very optimal on multi-core platforms. Of course, there are certain programs that run very well on GPU, but very inefficient on multi-core CPU, but that is a different topic.

The main issue is that OpenCL is an open Khronos standard supported by multiple vendors, including ATI, Intel and NVidia. CUDA is proprietary to NVidia only, so if NVidia is your main sponsor you might want to choose CUDA :)
Thanks,
Erwin

By the way: the upcoming Bullet 2.77 shows some OpenCL demos that are optimized for GPU, but can also run in parallel on multi-core platforms using MiniCL: a basic wrapper that runs OpenCL kernels multi-threaded using Win32 Threads or Posix.

Re: OpenCL vs. CUDA

Posted: Thu Jul 22, 2010 6:18 am
by Jan Bender
The main issue is that OpenCL is an open Khronos standard supported by multiple vendors, including ATI, Intel and NVidia. CUDA is proprietary to NVidia only, so if NVidia is your main sponsor you might want to choose CUDA :)
That's research. It must only run fast on my machine :wink:
But maybe I will use OpenCL, since I want to buy a machine with 12 cores. Hence, it would be nice to use these.

When will Bullet 2.77 be released? And will there be a GPU accelerated collision detection? In the next time I need a fast collision detection for cloth and deformable models :wink:

Cheers,

Jan

Re: OpenCL vs. CUDA

Posted: Wed Jul 28, 2010 9:34 am
by FD
Although OpenCL is supported by multiple vendors, it is much harder if not impossible to use Nvidia-specific high performance techniques with OpenCL, like first of all warp programming, high performance memory access patterns, etc. Not only you have the tools to create a more efficient program in CUDA, but many algorithms (single kernel scan, huffman compression, etc) are only possible to implement using the low-level nvidia-specific tricks that are only guaranteed to work in CUDA. So if the compatibility is not an issue and the targett platform is NVidia, I'd use CUDA without a doubt.

Re: OpenCL vs. CUDA

Posted: Sat Aug 07, 2010 6:53 pm
by projectileman
Concerning to OpenCL, which hardware do you recommend for this?

I already have an NVIDIA geforce 8600 which could execute OpenCL tests. However, I'm want to buy a more powerful GPU for OpenCL processing.

And I'm tempted to purchase the new ATI HD 5870, which seems that offer a lot of GPU power for a moderated budget. That ATI card seems good enough for games and beats all competence in that area, but...

Is it a good option for OpenCL processing? Does it behave better than NVIDIA countparts (geforce 280, geforce 4xx series) ?

I've watched some benchmarks with very heterogeneous results. In some tests ATI 5xxx series behaves so badly compared with NVIDIA hardware. But in others OpenCL outperforms NVIDIA 2 or 3x times.

And Tesla is not in my options, because is too expensive.