Bug: Broken OpenCL 1.2 in 350.12

Hello,

I am developing a program that uses OpenCL 1.2, and tried to run it against the new 350.12 driver what promises OpenCL 1.2 support on the GeForce GT 640 I have tested with. Unfortunately this version fails in a bad way on new 1.2 functionality.

One of the new functions in 1.2 is clRetainDevice, what needs to: “Returns CL_SUCCESS if the function is executed successfully or the device is a root-level device.” ( https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clRetainDevice.html )

This is not the case with 350.12, for calling this function on the root device, it returns CL_INVALID_VALUE (-30). This is not even a valid return type for this function: it can only return CL_SUCCESS, CL_INVALID_DEVICE, CL_OUT_OF_RESOURCES, or CL_OUT_OF_HOST_MEMORY.

Because the Khronos C++ bindings use retain in the copy constructor of cl::Device, this means my programs compiled with version 1.2 of the bindings fail immediately, and compiling using version 1.1 bindings obviously disallows using 1.2 features.

It’s suggested that you file bugs here:

https://developer.nvidia.com/nvbugs/cuda/add

It will also be helpful if you provide a complete code that someone else could copy, paste, compile, and run, without having to add anything or change anything, and see the reported issue. Also include your text from above.