开发者

cuda app on part of the cards

开发者 https://www.devze.com 2023-01-15 18:41 出处:网络
I\'ve got a Nvidia Tesla s2050; a host with a nvidia quadro card.CentOS 5.5 with CUDA 3.1 When i 开发者_如何转开发run cuda app, i wanna use 4 Tesla c-2050, but not including quadro on host in order no

I've got a Nvidia Tesla s2050; a host with a nvidia quadro card.CentOS 5.5 with CUDA 3.1 When i 开发者_如何转开发run cuda app, i wanna use 4 Tesla c-2050, but not including quadro on host in order not to lagging the whole performance while split the job by 5 equally.any way to implement this?


I'm assuming you have four processes and four devices, although your question suggests you have five processes and four devices, which means that manual scheduling may be preferable (with the Tesla devices in "shared" mode).

The easiest is to use nvidia-smi to specify that the Quadro device is "compute prohibited". You would also specify that the Teslas are "compute exclusive" meaning only one context can attach to each of these at any given time.

Run man nvidia-smi for more information.


Yes. Check CUDA Support/Choosing a GPU

Problem

Running your code on a machine with multiple GPUs may result in your code executing on an older and slower GPU.

Solution

If you know the device number of the GPU you want to use, call cudaSetDevice(N). For a more robust solutions, include the code shown below at the beginning of your program to automatically select the best GPU on any machine.

Check their website for further explanation.

You may also find this post very interesting.

0

精彩评论

暂无评论...
验证码 换一张
取 消