Reputation: 915
I never had 2 GPUs, but I am going have 2 on one PC soon.
Sometimes I would like to train a model using both cards, to train as fast as possible. However I imagine a situation, where I will want to train two distinct models simultaneously.
Will it be possible using frameworks like Tensorflow or PyTorch?
Upvotes: 0
Views: 45
Reputation: 1329
You can use very simple method. Start two distinct python scripts one with first model and one with second. In TensorFlow you can explicitly specify device by using with tf.device('/gpu:0'):
, with tf.device('/gpu:1'):
etc. For more information look at documentation TensorFlow Using GPUs.
Upvotes: 1