The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

clCreateImage{,2D,3D} vs the ICD loader

Hi there,

As part of PyOpenCL, I am trying to supply one interface to clCreateImage{,2D,3D}. It turns out to be harder than I thought to figure out which one to call.

My first idea was that as long as the header you compiled against (and thereby the ICD loader) offered the 1.2 function clCreateImage, then you would call that, and the translation to the older functions would be done for you behind the scenes. Unfortunately, none of the ICD loaders I've tried behaves this way.

In fact, for implementations that don't supply the 1.2 function, calling clCreateImage leads to a crash.

The spec doesn't say anything about this topic. It would be good if it did. It would be even better if it specified that the loader has to do some translation.

The current situation is highly unpleasant--it means I have to go and parse version numbers just to figure out what functions are safe to call for each and every platform.