Runtime API for OpenCL?


I haven’t yet had a chance to look at the OpenCL conformance candidate release, mostly because my productive systems here are 64 bits - whereas the drivers and SDK by nVidia is currently limited to 32 bits.

My assumption is that there is nothing like the runtime API provided by OpenCL. Is that right?

Would anyone here consider it useful if nVidia provided a similar (to CUDA) runtime API on top of OpenCL?


the beta gpu driver which is needed to run OpenCL is available for 64 bit systems:

for the first development steps on 32 bit systems, you can use my patch described at to run the 32 bit sdk on 64 bit systems.

OpenCL is almost the same like CUDA but it’s a non proprietary standard supported by other manufactures (ATI, Apple, etc.). The API is also similar to CUDA.

if you like to have an object oriented header file (i assume that this is what you meant with API), look at the khronos webpages

but you have to fix the header file slightly - it does not work due to the inconsistent state between the cl.h file provided by khronos and the opencl reference.

Or for extra credit, a CUDA to OpenCL source translator that could take your .cu file and generate the OpenCL device code and host calls. :)

(I assume only a subset of CUDA would directly translate…)

But seriously, yeah, a standard runtime-like API supported by multiple vendors would be nice. OpenCL host code is really hard to read right now.

Of course, I understand why this first release looks the way it does… The design avoids having to develop and distribute compiler tools to developers. The OpenCL device code is compiled in the driver transparently, and the host code is all standard C calls to a library. A runtime-like API requires a real toolchain.

Not currently. I believe the Khronos group is talking about doing a higher-level interface like this.

Apparently I was mistaken - the Khronos group currently has no plans to provide a higher level / runtime API for OpenCL. So if anybody else wants to have a go, go ahead!