OpenCL vs. CUDA

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
Jan Bender
Posts: 111
Joined: Fri Sep 08, 2006 1:26 pm
Location: Germany
Contact:

OpenCL vs. CUDA

Post 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
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia
Contact:

Re: OpenCL vs. CUDA

Post 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.

.
Jan Bender
Posts: 111
Joined: Fri Sep 08, 2006 1:26 pm
Location: Germany
Contact:

Re: OpenCL vs. CUDA

Post 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
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: OpenCL vs. CUDA

Post 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.
Jan Bender
Posts: 111
Joined: Fri Sep 08, 2006 1:26 pm
Location: Germany
Contact:

Re: OpenCL vs. CUDA

Post 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
FD
Posts: 26
Joined: Thu May 18, 2006 9:25 pm

Re: OpenCL vs. CUDA

Post 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.
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia
Contact:

Re: OpenCL vs. CUDA

Post 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.
Post Reply