[Beowulf] NVIDIA GPUs, CUDA, MD5, and "hobbyists"

John Hearns john.hearns at streamline-computing.com
Fri Jun 20 00:38:17 PDT 2008


On Thu, 2008-06-19 at 17:16 -0700, Kilian CAVALOTTI wrote:

> I don't even know how you choose (or even if you can choose) on which 
> GPU you want your code to be executed. It has to be handled by the 
> driver on the host machine somehow.

There are functions for discovering the properties of the GPU units on
the system, and for selecting the device.

You call the function   cudaSetDevice, from the manual:

cudaSetDevice() is used to select the device associated to the host
thread

and:

cudaGetDeviceCount() and cudaGetDeviceProperties() provide a way to
enumerate these devices and retrieve their properties:

int deviceCount;
cudaGetDeviceCount(&deviceCount);
int device;
for (device = 0; device < deviceCount; ++device) {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);




More information about the Beowulf mailing list