Trying to understand OpenCL Vs OpenCL on Cuda Architecture

All,

I tried to google for how OpenCL on Cuda Architecture is different from straight OpenCL implementation, but I tend to get to websites that just get into a lot of details but not the overview.

I understand Macs with Snow leopard has support for OpenCL, and I get the impression that Cuda is needed to be able to run OpenCL on Windows or Linux platforms. I thought Cuda is a close cousin to OpenCL in what they do - both are APIs where we can write code using either implementation to obtain GPU hardware acceleration.

What I am missing is that why do we need Cuda architecture to be able to run OpenCL code on a Windows or Linux computer? Does it mean that if I have openCL code written on a mac, I need to make changes to the source code to be able to run it on Win/Linux with an Nvidia GPU (e.g., include Cuda header files, link against Cuda libraries in addition to OpenCL includes and libraries)?

Thanks,
Vijay.

Opencl “cuda” platform is the OpenCL nVidia implementation. It’s just a normal OpenCL implementation, which, perhaps, use internally some cuda code.

On windows and linux you also have the AMD implementation which is called “ati stream”.

The OpenCL has a specification, that any vendor (AMD, NVIDIA, IBM, Intel, etc) needs to meet in order to say their product is OpenCL compliant. These are the bare minimum requirements.

OpenCL also allows for “optional extensions” which can be more proprietary or platform dependent. One example of this could be features on an NVIDIA card, double precision, expanded data type handling, etc. These cannot replace (to my knowledge) the specification requirements.

Unfortunately, when you get to this world of optional extensions, you are dealing with things that might not be easily documented in simple ways (but can be in great detail). Your best bet would be to check with the NVIDIA developer forums on what their CUDA OpenCL implementation has that the standard doesn’t.

-Kevin