PDA

View Full Version : how to differentiate between two GPU



jai
10-14-2012, 10:05 PM
if i have two GPU say intel and Nvidia in my system, how can i know which GPU i am using and how i can select particular GPU for use in openCL.
thanks

ajs2
10-15-2012, 07:10 AM
clGetDeviceInfo

jai
10-15-2012, 07:52 AM
ok if i have to use any particular GPU say NVIDIA, from AMD and NVIDIA from the system then what function i can use......

chippies
10-15-2012, 08:55 AM
There is no magic function. You have to loop through each OpenCL platform and check the name or vendor strings for some identifying trademark, e.g. AMD, Nvidia, Intel. Thereafter, you have to request all devices of the specific type that you are interested in - CPUs, GPUs or accelerator cards. If you want a specific device, for example the one with the greatest number of cores multiplied by clock frequency, then you're code must loop through all devices on your chosen platform until it finds the device that meets your requirements.