OpenCL vs CUDA

Discussion in 'Mac Programming' started by crick3r, Oct 28, 2009.

  1. macrumors newbie

    Feb 17, 2009
    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?
  2. macrumors 6502

    May 27, 2007
    Montreal Canada
    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.
  3. macrumors 6502a

    Sep 30, 2001
    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).
  4. macrumors 603


    Mar 27, 2009
    The World Inbetween
    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.

    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.
  5. macrumors G5


    Nov 25, 2005
    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).
  6. macrumors 6502a


    Jun 20, 2006
    Denver, CO
    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.

Share This Page