Christos Baziotis
Christos Baziotis

Reputation: 6035

theano - use external GPU only for ML and integrated GPU for display

I have a CPU with integrated GPU. I also have an external GPU that i have been using for ML. What i want is to use the integrated GPU only for display and dedicate the external GPU to NN training (in order to free some memory).

I have set at the BIOS the external GPU to be the primary GPU, but also to both be active. So they are both working. After i boot the system i can plug the monitor to any one of them and they both work.

The problem is that when i plug the monitor to the motherboard (integrated GPU) theano stops using the external GPU:

ERROR (theano.sandbox.cuda): ERROR: Not using GPU. Initialisation of device gpu failed:

Is there a way to explicitly point theano to the external GPU? here is my the relevant part of my .theanorc:

[global]
floatX = float32
device = gpu

Upvotes: 2

Views: 184

Answers (1)

Kh40tiK
Kh40tiK

Reputation: 2336

I have a similar system to yours. For linux, installing bumblebee worked.

sudo apt-get install bumblebee-nvidia (adapt to your distro's package manager)

Then launch python via: optirun python

Upvotes: 2

Related Questions