PDA

View Full Version : OpenCL vs CUDA




crick3r
Oct 28, 2009, 07:46 PM
is OpenCL slower than CUDA in 10.6.1?

I can't believe so much hype with OpenCL and after all I get worse performance than compiling with CUDA... Am I alone?



Animalk
Oct 28, 2009, 07:59 PM
The disadvantage of OpenCL on OS X is that Apple is the one who wrote the implementation. Not NVidia and not ATI. I'm not saying that Apple's graphics driver teams suck (though many would argue otherwise) but their is no doubt that the people who know best are not steering the Apple graphics ship.

NVidia wrote the implementation of CUDA itself and knows better than anyone how to tap its graphics card resources.

There is a price to pay for an industry standard and portability.

holmesf
Oct 30, 2009, 03:17 AM
is OpenCL slower than CUDA in 10.6.1?

I can't believe so much hype with OpenCL and after all I get worse performance than compiling with CUDA... Am I alone?

Could you post your OpenCL and CUDA kernels as well as performance information? I have tried simple kernels on OpenCL and CUDA and get roughly the same performance (GeForce 8800).

MorphingDragon
Oct 30, 2009, 05:31 AM
The disadvantage of OpenCL on OS X is that Apple is the one who wrote the implementation. Not NVidia and not ATI. I'm not saying that Apple's graphics driver teams suck (though many would argue otherwise) but their is no doubt that the people who know best are not steering the Apple graphics ship.

Its up to the other companies to implement it on things like Linux. Plus Apple's drivers are derived form the openly available documentation. I remember reading somewhere that ATi makes the drivers for Apple as well.

NVidia wrote the implementation of CUDA itself and knows better than anyone how to tap its graphics card resources.

But nVidia doesn't make Cuda programs.

OpenCL is doing better than CUDA did at launch. OpenCL is backed by all the Graphics Manufacturers and AMD is pushing it for use as Open Physics.
OpenCL can even be used to replace SMP/GCD apparently.

gnasher729
Oct 30, 2009, 10:51 AM
The disadvantage of OpenCL on OS X is that Apple is the one who wrote the implementation. Not NVidia and not ATI. I'm not saying that Apple's graphics driver teams suck (though many would argue otherwise) but their is no doubt that the people who know best are not steering the Apple graphics ship.

NVidia wrote the implementation of CUDA itself and knows better than anyone how to tap its graphics card resources.

There is a price to pay for an industry standard and portability.

On the other hand, Apple is way up in the use of compiler technology. It uses LLVM, which is the same compiler that is used to compile most of Snow Leopard, to compile your kernels to code for the graphics hardware. (Or to code for your CPUs, whatever seems more suitable).

LtRammstein
Oct 30, 2009, 04:34 PM
One of my professors, who was at the OpenCL Conference, said that OpenCL can run CUDA code no problem. I haven't tried this out myself, but can someone see if this is true? If it is, then write stuff in CUDA and then "port" it over to OpenCL.