OpenCL on the CPU
So the old news is that the OpenCL specification has been done in record time and endorsed by all the major GPU manufacturers.
This is many kinds of awesome, but I’m wondering if any particular vendor is going to concentrate on a CL_DEVICE_TYPE_CPU implementation. I think a CPU implementation of OpenCL is important for two reasons:
- Debugging. Have you ever tried to debug a large CUDA kernel? This is my number 1 reason for a CPU implementation, as we can generate some nice debug info and use our favourite debugger.
- Wider Adoption. Not everyone has access to a machine with a 1 million thread GPU from the future. However, pretty much everyone has multiple SIMD cores, even in one year old laptops. If low/mid performance can be achieved by using SIMD, software fibers, and multiple physical cores, then a developer can write extremely scalable code with minimal requirements for a baseline spec.
Wikipedia states that LLVM are doing the initial implementation of OpenCL, but has no citation. Perhaps I’ve missed some announcement or other, but if I get to read about full-featured CPU OpenCL support for a popular compiler (e.g. gcc, msvc) then I will be very happy!
I think Apple most likely will have a CPU implementation. All Macs sold nowadays are multicore, but some have crappy GPUs (Intel GMA 950 or X3100). The LLVM quote from wikipedia also probably refers to Apple (since, well, LLVM is mostly an Apple project, and they are already using it for OpenGL software fallbacks).
Aras Pranckevi?ius
16 Jan 09 at 5:09 pm
I think that OpenCL on the CPU must be always present
Reasons: Servers withoug GFX card, Remote Desktop, and as Simon said debugging. Also bit old benchmarking games for fun (& profit).
Concerns: There should not be differences in calculations, given the same floating point rules (Obviously there is no 80bit floating point in most GPU’s, so the CPU version should be probably SSE2 or something in the like).
Dimiter "malkia" Stanev
11 Jun 09 at 9:56 pm