Cuda and Nvidia Optimus

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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
OcranaAuthor Commented:
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.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OcranaAuthor 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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.