How can I know that GPU is free for my Open CL code and not for other tasks ?
I want to use Open CL to run some computations and use AMD's GPU.
But this GPU is also used to display the GUI of the application which contains images, menus etc.
The libraries used for graphic is WPF.
Of course the GPU is also used for windows itself.
When I'm using the GPU to run Open CL how can I know that it is free and not used for other graphic tasks ?
You can check if it is being used for OpenGL by asking OpenGL what device it is using.
But you shouldn't need to do this; the driver handles dividing time between the multiple users. Just don't run kernels that take more than 20ms to run or you'll make the UI sluggish.
Originally Posted by Dithermaster
If Open GL is not used (just WPF or GDI+) can I be sure that GPU is free ?
Perhaps, but these days the GPU is always used by something. For example, Windows (Aero Glass) and Max OS X both use the GPU for window composition.
Originally Posted by zvivered
Sharing resources is common these days. If you need a dedicated GPU, use a Tesla card.