[PYTHON] How to use TensorFlow on GPUs less than Titan

GPU supported by TensorFlow

TensorFlow officially only supports GPUs with "NVidia Compute Capability" of 3.5 or higher. In other words, basically it only supports GPUs of Titan or higher. This is explained in "Optional: Install CUDA (GPUs on Linux)" at https://www.tensorflow.org/get_started/os_setup.html#installation-for-linux as follows.

TensorFlow GPU support requires having a GPU card with NVidia Compute Capability >= 3.5. Supported cards include but are not limited to:

  • NVidia Titan
  • NVidia Titan X
  • NVidia K20
  • NVidia K40

Therefore, for example, if you install using the TensorFlow binary for GPU currently distributed (12.7.2015), an error will occur if you use an unsupported GPU such as GTX 960.

However, you can install TensorFlow for GPUs with "NVidia Compute Capability" of 3.0 by using the "unofficial settings" described in "Enabling Cuda 3.0" on the same page.

important point

Note that there are many incompatible libraries just because they say "unofficial", and most of them don't seem to be test-supported. This can be confirmed by the following precautions that appear during installation (step 2 of "Procedure").

WARNING: You are configuring unofficial settings in TensorFlow. Because some external libraries are not backward compatible, these settings are largely untested and unsupported.

procedure

Follow the steps below to actually install.

Follow the steps below to build from source according to the official website (https://www.tensorflow.org/versions/master/get_started/os_setup.html):

  1. Execute "Installing from sources" before "Configure the installation"
  2. Enable "unofficial settings" </ b> ("unofficial settings") on ./configure according to" Enabling Cuda 3.0 " --The same content as above is detailed at https://github.com/tensorflow/tensorflow/issues/25#issuecomment-156234658.
  3. Follow "Create the pip package and install" to create a pip wheel and install TensorFlow -(This procedure is performed when you want to install in a virtual environment such as pyenv, virtualenv. When installing TensorFlow in python of the system, do not create a pip package and follow "Build your target with GPU support".)

The author confirmed the operation on Geforce GTX 960, Ubuntu 15.04 with this setting. (I checked the operation by executing https://github.com/woodrush/neural-art-tf.)

Recommended Posts

How to use TensorFlow on GPUs less than Titan
How to use Dataiku on Windows
Notes on how to use featuretools
How to use homebrew on Debian
How to install TensorFlow on CentOS 7
Notes on how to use doctest
How to use mecab, neologd-ipadic on colab
How to use Google Assistant on Windows 10
Memorandum on how to use gremlin python
How to use tensorflow under docker environment
How to use Python Kivy ④ ~ Execution on Android ~
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use Virtualenv
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use virtualenv
How to use Matplotlib
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
How to use C216 Audio Controller on Arch Linux
A memorandum on how to use keras.preprocessing.image in Keras
Autoencoder with Chainer (Notes on how to use + trainer)
How to use Django on Google App Engine / Python
[Tips] How to use iPhone as webcam on Linux
How to use Qt Designer
How to use search sorted
[gensim] How to use Doc2Vec
python3: How to use bottle (2)
Understand how to use django-filter
How to use the generator
[Python] How to use list 1
How to use FastAPI ③ OpenAPI
How to register on pypi
How to use Python argparse
How to use IPython Notebook
How to use Pandas Rolling