I have several Gpu in a machine.
Is there any way to use all those Gpus for train?
And also can I select special GPU for a train?
Hi @gloryyingling,
To set a specific GPU for training you can set env variable CUDA_VISIBLE_DEVICES. For example, to run training on GPU 1 run the following before running the training
export CUDA_VISIBLE_DEVICES=1
To run training using several GPUs, please see, example in https://github.com/facebookresearch/wav2letter/blob/master/docs/train.md in Distributed part.
To sum up: for example, if you want to run training on GPUs 2, 3, 4 you can run
export CUDA_VISIBLE_DEVICES=2,3,4
mpirun -n 3 <train_cpp_binary> [train|continue|fork] \
-enable_distributed true \
<... other flags ..>
Thank you for your clean guide. I will try.
Most helpful comment
Hi @gloryyingling,
To set a specific GPU for training you can set env variable
CUDA_VISIBLE_DEVICES. For example, to run training on GPU 1 run the following before running the trainingTo run training using several GPUs, please see, example in https://github.com/facebookresearch/wav2letter/blob/master/docs/train.md in Distributed part.
To sum up: for example, if you want to run training on GPUs 2, 3, 4 you can run