4

When I see some tutorials regarding TensorFlow with GPU, it seems that the tutorial is using tensorflow-gpu instead of tensorflow.
The only info I got is the pypi page where it doesn't cover much information.
Where the official web says that the tensorflow already packed with GPU support.

So are there any differences between the two libraries?

My hypothesis is in the early version tensorflow doesn't have native GPU support they create separate libraries, and the tensorflow-gpu is still updated for older users who already use tensorflow-gpu.

[Update]
Thanks to the comment and the answers. I just finish installing several prerequisites related to Nvidia and use the plain TensorFlow and now I need to reinstall the CUDA version since the latest CUDA not compatible with the latest tensorflow. It's true that the setup can be a pain in the arse.

Vinson Ciawandy
  • 996
  • 11
  • 26
  • 1
    setting up gpu version is sometimes a pain in the arse, with so many packages and libraries that need to work together and there are only a few good combination of versions that do. so there is a simple cpu version for those who do not need the cuda cudnn capabilities. – aSaffary Apr 17 '21 at 06:47

2 Answers2

2

The main difference 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.

Support for TensorFlow libraries for hardware type: tensorflow tensorflow-gpu
cpu-only yes no (~tf-like)
gpu with cuda+cudnn installed yes yes
gpu without cuda+cudnn installed yes no (~tf-like)

More info

More info

s_baldur
  • 29,441
  • 4
  • 36
  • 69
Dev Shah
  • 60
  • 5
1

There are not many differences between the two libraries. The core syntaxes will be the same, if you have installed tensorflow-gpu in your python(or conda) environment, then the inference will simply run on the GPU. Along with tensorflow-gpu packages, CUDA toolkit for python will be automatically installed if you are using conda environment.

Aswath
  • 454
  • 5
  • 6