Some Questions about OpenCL

Hi all. :)
I use CUDA for nearly 2 years, but I never use OpenCL.
I have some questions about OpenCL, please help me.

  1. Which GPU card supports OpenCL (both Nvidia Card and ATI card)?
  2. What is the difference between Nvidia-OpenCL and ATI-OpenCL (a program written in Nvidia-OpenCL will work correctly in ATI-OpenCL)?.
  3. Will a program written in CUDA still works correctly in Nvidia-OpenCL?
  4. What is the benefit of a program written in CUDA vs. Nvidia-OpenCL?
  5. Will Intel GPU (larrabee) supports OpenCL?

Thank all
Quoc Vinh!

All NVIDIA G8x and later GPUs support OpenCL (the same cards as support CUDA). You will have to ask AMD about their support, I believe they have only released a CPU implementation at this point.

They are just different implementations of the same API (the same as the difference between NVIDIA and AMD’s OpenGL drivers). Programs written to the spec should run correctly on any hardware, this is one of the main advantages of OpenCL. There are some extensions we support that they do not.

In practice I expect you will have to do some optimization for each vendor, since the underlying hardware is quite different.

CUDA is a separate API and language, so you can’t run CUDA programs “in” OpenCL. The languages are similar, however, so it is relatively easy to port between the two. You can run CUDA and OpenCL programs on the same machine, if that’s what you’re asking.

The CUDA runtime API and language integration make it somewhat easier to use than OpenCL, and it has several features that make it useful for high performance computing in cluster environments, but it’s really up to you to decide! The performance of a well-written OpenCL program should match the equivalent CUDA code.

Again, you’d have to ask Intel.

Simon Green, Thank you for your answers.

1-Only nVidia CUDA-enabled GPU supports OpenCL, none ATI videocard support OpenCL at this time, ATI released ONLY a CPU-enabled OpenCL implementation. And I suspect they may not have correct implementation of OpenCL until HD 5000 series ('cause of lack of Shared Memory before HD 4000 and how it’s implemented in HD4000 series)

2-This is 2 implementations of the same standard, as stated by Quoc Vinh, but nVidia support nVidia CUDA-enabled GPU (GeForce 8000 series and later), ATI implementation only support x86 CPU and NONE ATI GPU.

You will also not only “optimize” code for each but select algorithms that fit well with these 2 differents architecture to obtain a maximum performance-level. (CPU and nVidia GPU usually are not performing their bests on same algorithms to solve a common problem!)

Now I could fully answer your question.

1.nVidia GeForce 8000 series, 9000 series and G/GT/GTS/GTX series, all support OpenCL.

2.ATI HD 4000 series (and forthcoming HD 5000 series) may support OpenCL, at this time only 4850 and 4870 are officially supported by OpenCL

But the ATI GPU will probably have performances far behind NVidia’s, due to lack of real Shared Memory, dynalically adressable.

thank you iAPX. :)

I am using geforce8400M GS (my laptop) and geforce GTX 295 for destop computer.

at this moment, I currently using CUDA, and waiting for the first Nvidia-OpenCL release version.

Get a Mac, OpenCL works totally on a Mac, on ATI GPU, nVidia GPU and the CPU at-once :-)