I have a computer with the windows operating system with an amd gpu (rx 5600 xt), and I want to run tensorflow on the gpu.
I found "tensorflow-directml" which allows me to run tensorflow on my gpu, but it uses tensorflow 1.14.0.
Is there another version of "tensorflow-directml" that uses tensorflow v2, or is there another way to run tensorflow in my gpu?
Thanks, and sorry if I wrote something wrong or inaccurate
Microsoft has announced DirectML-plugin for tensorflow 2 in June this year. Check it out at this link: https://learn.microsoft.com/en-us/windows/ai/directml/gpu-tensorflow-plugin. However I believe for your particular GPU model DirectML-plugin may not be compatible as of yet.
Is there another version of "tensorflow-directml" that uses tensorflow
v2
No, According to pypi, latest release (i.e. on Sep 12, 2020) tensorflow-directml 1.15.3.dev200911 is available for public. For more details please refer this.
To run Tensorflow in GPU on windows
For TensorFlow 1.x (i.e. for releases 1.15 and older, CPU and GPU packages are separate)
pip install tensorflow-gpu==1.15 # GPU
For Tensorflow 2.x (i.e. V2) onwards, pip package includes GPU support for CUDA enabled cards
pip install tensorflow
For more information please refer this.
Related
I was trying to this project for my school https://www.youtube.com/watch?v=COlbP62-B-U
Everything worked smooth till i encountered that pip install tensorflow doesn't work.
then I tried this for install tensorflow TensorFlow not found using pip. I could successfully install tensorflow but still tensorflow-gpu couldn't be install.
Any idea how can I do that.
Updated for tensorflow 2:
Tensorflow 2.x
There is no separate installation for tensorflow GPU in 2.x, it's a unified installation for both CPU and GPU. The package will be built with GPU support if and only if a compatible GPU is available. To verify, use the command:
tf.test.is_built_with_cuda() after installing.
Source
Note that you still need a compatible GPU first.
Tensorflow 1.x:
No, you need a compatible GPU to install tensorflow-GPU.
From the docs.
Hardware requirements: NVIDIA® GPU card with CUDA® Compute Capability
3.5 or higher.
No you cannot, its like installing a soul without body.
But if you are a curious learner and want to try something amazing with DL try buying GPU-compute instances on Cloud or try out Google Colab.
No, but you can use Google Colab (https://colab.research.google.com), which has the option of using GPUs in the notebooks.
No, you Can not install Tensorflow gpu without nvidia graphic card.
I got a new pc recently with a windows 10 and an RTX 2070. I installed anaconda in order to use python and the deep learning frameworks available as keras. I install with anaconda navigator the keras-gpu package. It seems that installing this package will install a "cuda-toolkit 10" and "cudnn" package on anaconda.
I was wondering if my gpu will be used in a optimize way during the training on keras. In fact, in the past, when I installed keras gpu , I had to install microsoft community 2015 and cuda toolkit 9.0/Cudnn on my own in order to make keras gpu working. So, it seems a bit weird that I had no error.
Thank for the help !
It depends on what backends your keras is using.
e.g. If you are using tensorflow, the following statement will give you the answer.
print(tf.test.is_gpu_available())
in a few days I will setup my new computer with a RTX 2070.
I would like to user tensorflow GPU but I can't find compatible versions of CUDA and Tensorflow GPU.
As far as I know, I need CUDA 10 to benefit from the additional computing power of the RTX's Turing architecture. But regarding to the Tensorflow website the newest version of tf (tensorflow_gpu-1.12.0) only works with CUDA 9.
I would prefer to get it all working on windows 10 but if there is no other way, linux would work as well.
Somewhere on the internet I read about two rumors:
1. there is some way to compile an unpublished version of tf-gpu which works with CUDA 10
2. they will publish an official version of tf-gpu in january 2019 (which is almost over now) which will support CUDA 10.
Can someone confirm one of those rumors (with source would be the best) or tell me how I will be able to get it all working?
You're correct that you need cuda 10 and that tensorflow-gpu currently doesn't support it. What you need to do is compile tensorflow from source like your first rumor.
Installation steps:
Install CUDA 10 and cuDNN 7.3.1
Configure Tensorflow and compile it
Install the .whl package with pip
Here are some tutorials to compile tensorflow.
Windows:
https://www.pytorials.com/how-to-install-tensorflow-gpu-with-cuda-10-0-for-python-on-windows/2/
Ubuntu:
https://medium.com/#saitejadommeti/building-tensorflow-gpu-from-source-for-rtx-2080-96fed102fcca
https://towardsdatascience.com/how-to-make-tensorflow-work-on-rtx-20xx-series-73eb409bd3c0
Alternatively
you can find the pre-built tensorflow wheels here, thus skipping step 2:
https://github.com/fo40225/tensorflow-windows-wheel
This question already has an answer here:
tensorflow on GPU doesn't work
(1 answer)
Closed 2 years ago.
I've installed tensorflow CPU version. I'm using Windows 10 and I have AMD Radeon 8600M as my GPU. Can I install GPU version of tensorflow now? Will there be any problem? If not, where can I get instructions to install GPU version?
Your graphics card do not support CUDA drivers without which you cannot use tensorflow on GPU. Your system will run tensorflow but only on CPU.
However you can use pytorch it is another way to similar task. PyTorch has another version called CLTorch which runs on OpenCL which runs on your graphics card.
Please follow this link for more details.
https://github.com/hughperkins/cltorch
First of all, if you want to see a performance gain, you should have a better GPU, and second of all, Tensorflow uses CUDA, which is only for NVidia GPUs which have CUDA Capability of 3.0 or higher. I recommend you use some cloud service such as AWS or Google Cloud if you really want to do deep learning.
If you want to use an AMD GPU with TensorFlow, you can follow the instructions here.
However:
The GPU you are using is not that powerful and unlikely to give you much of a performance boost
You will need to use Linux with these instructions, although there is a Windows version of ComputeCpp it has not been tested with TensorFlow yet.
It depends on your graphic card, it has to be nvidia, and you have to install cuda version corresponding on your system and SO. Then, you have install cuDNN corresponding on the CUDA version you had installed
Steps:
Install NVIDIA 367 driver
Install CUDA 8.0
Install cuDNN 5.0
Reboot
Install tensorflow from source with bazel using the above configuration
I am running the cifar10 multi-GPU example from the tensorflow repository. I am able to utilize more than one GPUs. My ubuntu PC has two Titan X's, I see memory are fully occupied by the process on both GPUs. However, only one GPU is actually computing. I obtain no speedup. I have tried tensorflow 0.5.0 and 0.6.0 pip binaries. I have also tried compiled from source.
EDIT:
The problem disappeared after I installed an older version of nvidia driver.
The problem disappeared after I installed an older version (352.55) of nvidia driver.