AnsweredAssumed Answered

OpenCL GPU selection criteria

Question asked by wayne_static on Oct 27, 2013
Latest reply on Jun 11, 2014 by sureshs



I'm very curious about the selection process of a GPU in a system with more than one GPU. I'm about to run some experiments on some machines and here is a summary of 2 of the machines:


M1 - contains 2x Sapphire HD 7970 GPUs with SLI disabled and only one GPU powers the displays.

M2 - contains an MSI HD 7750 and an ASUS HD 7750 GPU. SLI is disabled and the MSI HD 7750 GPU powers the display.

M1 is running Windows 7 x64 Enterprise, M2 is running Windows 7 x64 Professional and both systems are running Catalyst version 13.9.


In my code I usually use the following to fetch my devices;


deviceList = Context::getInfo<CL_CONTEXT_DEVICES>(&status), where deviceList is of type vector<cl::Device> and status is just error code.


When I execute the program, on machine M1 deviceList[0] happens to be the GPU connected to the display but on M2, deviceList[0] is the idle GPU. Hence the code behaves exactly how I would want it to by running on the idle GPU on M2 and not on the GPU driving the displays.


My question is, is there something I need to know regarding how to correctly select the idle GPU each time, regardless of the system setup?


Many thanks.