Cuda and Nvidia Optimus

Ocrana
Ocrana used Ask the Experts™
on
Hello,
hope to find a developer here who have experience with Cuda development and special with the new Nvidia Optimus.
How I can detect programatic  what graphic card is active inside an Optimus system? I tried it with different ways but I always get the message that the graphic card, Quadro 2000M, is active. But I start the software with Intel Graphic card option. So it seems, Nvidia drivers and framework is always loaded.

Ocrana
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I'm not an expert on CUDA or Optimus, but I do know graphics hardware programming.

I think you're confusing contexts here.  CUDA is designed to do parallel computation on nVidia GPU's.  So obviously it doesn't run on Intel graphic chips.  When you ask CUDA what its using, it will always mention the nVidia hardware.  It makes no difference what display adapter is active.  A system could have the GPU's inside and not attached to a display adapter.  They are effectively general purpose processors which are mostly used for graphics.

Something like DirectX would tell you what display adapters were present and active.  OpenCL would be the way to program Intel's GPU chips, but Intel do not support it at the moment.

Author

Commented:
Hi,
a Optimus sytem is a hybrid system so I need to have the info what grahic card is active to switch on/off CUDA in my app.
Ocrana
Indeed, but CUDA won't tell you that, it will only tell you what nVidia GPUs are available.  CUDA is not a display system.  Would it matter if the Intel card was active and you used CUDA?  The chips are still present and it will still work.  If you want to use CUDA for processing textures than I guess the problem will be transfer between the systems.

If you want to know what display adapter is active you can use DirectX, OpenGL or the Windows system information functions.  Assuming you're working on Windows of course.

Author

Commented:
Hi Sure, I work in windows. But I think you do not understand hybrid systems. Both cards are present, both cards are loaded. It is just the question about the "Bus". You cannot ask "What card is active". You will get for both cards a "true" because you can switch "on the fly" or run one app with Nvidia and one with Intel.
Our app works perfect with Nvidia and Cuda, but I have to know what the user selected to run. I do not think, it is a good way to activate the full GPU system/power if the user started the app with "Intel" option.
Optimus is a system to save power.
So I need to know from Nvidia, Cuda or whatever, what card was used while starting the software.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial