Wednesday, August 31, 2011

OpenCL and pyopencl error

I installed pyopencl on my new laptop, running Windows 7 x64.
I ran a demo from
and I got a mysterious error:
pyopencl.LogicError: Context failed: invalid gl sharegroup reference khr

I installed the latest drivers, and worried a bit, but then I realized the problem was the Optimus device in my laptop. I went into the 3D settings in the NVIDIA control panel and changed the Global setting to use my high performing NVIDIA card instead of the Optimus built-in one.
That solved it for me. Now I can run the OpenCL/OpenGL interop demos.