I have installed the GPU version of tensorflow on an Ubuntu 14.04.
I am on a GPU server where tensorflow can access the available GPUs.
I want to run tensorflow on the CPUs.
Normally I can use env CUDA_VISIBLE_DEVICES=0
to run on GPU no. 0.
How can I pick between the CPUs instead?
I am not intersted in rewritting my code with with tf.device("/cpu:0"):
TensorFlow supports running computations on a variety of types of devices, including CPU and GPU.
The main difference between this, and what we did in Lesson 1, is that you need the GPU enabled version of TensorFlow for your system. However, before you install TensorFlow into this environment, you need to setup your computer to be GPU enabled with CUDA and CuDNN.
You can also set the environment variable to
CUDA_VISIBLE_DEVICES=""
without having to modify the source code.
If the above answers don't work, try:
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With