quadro 2000m (optimus) and memory allocation issues

I have an application that uses OpenGL interoperability. Once I create the CUDA + OpenGL ocntext I start getting serious memory allocation problems. I’m not sure yet if it also happens with a regular context, trying to verify.

This application allocates several buffers using pinned memory, an OpenGL texture, a render buffer object and two CUDA buffers. The application itself is 32bit but the system is 64bit windows 7 (driver is 280.26)

On one machine (desktop with GeForce gtx 570) I can allocate all buffers with no problem. That machine has 4GB memory and the GPU has 1.2 GB memory.
On the laptop with 8GB memory, and a Quadro 2000m with 2GB memory, i run out of memory way before I get there. The problem is that even before GPU allocations fail, the pinned memory allocation start to fail, and even regular c++ new throws out of memory.

It does look like the GPU is playing something strange with the memory as Windows (via the NVIDIA control panel) reports the GPU as 2GB with 0MB video memory and 3816MB shared system memory.

Same behavior happens if I bypass optimus and tell the laptop to use the discrete GPU only.

Any ideas what is going on and if there is a way to fix this?


I have the same issue though I am not using CUDA. It seems like the buffers are going straight to shared/system memory instead of the dedicated GPU memory. This happens only in OpenGL, there is no performance issue with buffers in DirectX. The same program runs fine on an array of much more modest desktop systems.
I am guessing we probably have the same laptop, W520, as it is the only one I’ve seen this GPU on.
Did you end up finding any solution to this issue, or perhaps someone can offer a suggestion?

Indeed the same laptop, although the Dell precision M4600 also has the 2000m as an option (although I really don’t like the full keyboard, terrible choice ergonomically)

Didn’t find a solution to the problem and if I’m not mistaken, doesn’t happen when I do just CUDA, but once OpenGL comes into play I’m in trouble, also when configuring the BIOS to use discrete graphics only.