The diffenent between CUDA and OpenCL

Hi, I want to ask a question: The diffenent between CUDA and OpenCL.

(1) CUDA does some language extension from C and C++?
(2) OpenCL does not do any language extension from C and C++, it is just a API?
(3) Is there any methodes for CUDA can support AMD GPU?

Thanks very much.

The CUDA “runtime” programming interface uses some extensions to C/C++, most notably the <<<…, …>>> syntax to launch kernels. The “driver” programming interface is strictly C-based, as is OpenCL.

There is no official way to run CUDA code on AMD GPUs, but have a look at Ocelot.

CUDA and OpenCL are basically C/C++ API’s for connecting host code(CPU) to device code(GPU.) Both CUDA and OpenCL device codes(GPU side) are also C/C++.

But, like tera said, CUDA has 2 APIs: Runtime and Driver API. The Runtime API has a few really nice compiler features, so that you can mix unified GPU and CPU code in a single file compile it very easily, and it’s just fun, simpler, and cleaner to get started coding! Porting CUDA code to OpenCL shouldn’t be too complicated though. For large programs, the extra overhead of OpenCL should be insignificant.

I haven’t heard of any way to do CUDA on AMD.

We recently held a webinar to explore the differences between CUDA and OpenCL, which is now available in the Youtube video embedded in this blog post.

Enjoy!

Thanks very much for all of you. Your answer are really helpful. Thanks again.