Fool-proof way to check for device/driver compatibility?

I’m building an application that uses OpenCL on windows, including OpenCL 2.0+ features.

On my own machine, that has compatible HW and up-to-date drivers, I get no problems running the builds.

However, I’ve been deploying it to other machines and have been encountering freezes/crashing for various reasons during initialization of my OpenCL kernels/programs/etc.

The other machines have either incompatible HW (no gfx card or gfx card not compatible with OCL2.0+), out-of-date GFX drivers, out-of-date OpenCL drivers, etc.

I already track OpenCL-returned error codes, but I’m also getting segmentation faults on these machines during initialization of the various OpenCL functions, or they will simply hang during OCL program initialization.

How can I do a robust compatibility check on a particular machine?

[QUOTE=ivanisavich;44080]
How can I do a robust compatibility check on a particular machine?[/QUOTE]

Regarding errors during initialization of the varions OpenCL functions: Are you checking that the device supports OpenCL 2.0 (via CL_DEVICE_VERSION) before calling any OpenCL 2.0-specific functions? I figure so, but it never hurts to ask. :slight_smile:

Unfortunately I can’t do that due to NVidia partial implementation of OpenCL2.0 that I need to support (their drivers return 1.2 as the version, but they support 2.0 features like enqueue_kernel).

Some of NVIDIA’s post-1.2 features are indicated by clGetDeviceInfo / CL_DEVICE_EXTENSIONS strings, such as cl_nv_copy_opts which was used when their driver was at 1.1 to indicate a 1.2 feature (a buffer map flag).