How do I install tensorflow with gpu support for Mac? - tensorflow

My MacBook Pro doesn't have a NVIDIA gpu. So it's not possible to run CUDA. I'm wondering which of the earlier versions of TensorFlow have gpu support for Mac OS? And how can I install on Anaconda?

As stated on the official site:
Note: As of version 1.2, TensorFlow no longer provides GPU support on
Mac OS X.
..so installing any earlier version should be fine. But since your hardware does not have NVIDIA graphics card with CUDA support, it doesn't matter anyway.
In terms of installing TensorFlow on Mac OSX using Anaconda, you can just follow steps nicely described in the official docs

TensorFlow relies on CUDA for GPU use so you need Nvidia GPU. There's experimental work on adding OpenCL support to TensorFlow, but it's not supported on MacOS.
On anecdotal note, I've heard bad things from people trying to use AMD cards for deep learning. Basically AMD doesn't care about deep learning, they change their interfaces without notice so things break or run slower than CPU.

Related

How to deal with CUDA version?

How to set up different versions of CUDA in one OS?
Here is my problem: Lastest Tensorflow with GPU support requires CUDA 11.2, whereas Pytorch works with 11.3. So what is the solution to install both libraries in Windows and Ubuntu?
One solution is to use Docker Container Environment, which would only need the Nvidia Driver to be of version XYZ.AB; in this way, you can use both PyTorch and TensorFlow versions.
A very good starting point for your problem would be this one(ML-WORKSPACE) : https://github.com/ml-tooling/ml-workspace

How to import tensorflow-GPU with AMD graphics card, or any workaround

I have AMD graphics card with me. Now, when I try to import tensorflow, I get the following error.
I think (as I understand) that if I use normal TF and not TF-GPU, then this issue may resolve. However, I do want to use the graphics card because my reinforcement learning algorithms are really very slow otherwise. Is there any workaround?
ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that
this DLL be installed in a directory that is named in your %PATH%
environment variable. Typically it is installed in
'C:\Windows\System32'. If it is not present, ensure that you have a
CUDA-capable GPU with the correct driver installed.
Currently, right now with AMD, there are two ways you can go about it.
Either using the lastest AMD's ROCm to install tensorflow.
official ROCm install
and
official ROCm tensorflow install
check if you use the supported AMD GPU check it over here
or using the OpenCL implementation of TensorFlow if your video card does not support ROCm
https://github.com/benoitsteiner/tensorflow-opencl
or
https://github.com/hughperkins/tf-coriander

Can I run Tensorflow, Keras,and Pytorch for deep learning projects on the latest and highly spec iMac Pro without Nvidia GPUs

I love my iMac and do not mind paying top dollars for it. However I need to run Tensorflow, Keras, and Pytorch for deep learning projects. Can I run them on the latest and maxed-out spec iMac Pro ?
tensorflow 1.8 supports ROCm, IDK how it performs next to nvidia's CUDA
but that means that if you have GPU (radeon) that supports ROCm you can use tensorflow gpu
running tensorflow on gpu is possible but extremely slow and can be added to the definition of torture

Illegal instruction (core dumped) -Tensorflow GPU

I have installed Tensorflow-GPU version 1.9.0 and simple tensorflow import statement gives exception "Illegal instruction (core dumped)". If I downgrade tensorflow version to 1.5.0, it works fine. How to fix this issue for higher version as I need to work with it?
Thanks
Starting with v1.5.1 on Linux and v1.6.0 on other platforms, the official TensorFlow distribution is compiled with AVX instructions, meaning that older CPUs will not work with it (you can look up model compatibility, but it does not have to be an ancient CPU, it happened to me on an old Core i7).
If you want to use official releases, the only solution is to switch to a different hardware or to stick to the older version. There have been requests for support for older CPUs (and some people have uploaded their own build for a particular configuration, if it works for you and you trust it), but the general answer is that if you need specific support for your platform you can always build it yourself, disabling AVX optimizations (see the installation guide).

I'd like to manipulate the way using gpu in tensorflow lite, what can i study for that

At first, let me explain what i have to do.
My develop enviroment is Tizen OS. may be you are unfamilier that, anyway this os is using linux kernel based redhat and targeting on mobile, tv, etc.. And my target device is consists of exynos 5422 and arm mali-t628.
My main work is implement some gpu library to let tensorflow lite's operation can use the library.
I proceeded to build and install tensorflow lite as a rpm package file.
I am googling many times about the tensorflow and gpu. and get some useless information about cuda. i didnt see any info for my case(tizen and mali gpu).
i think linux have gpu instruction like the cpu or library.. but i cant find them.
can you suggest search keyword or document?
You can go to nvidia’s cuda toolkit page, where you can find the documentation and
Training buttons / options.
Also there’s the CUDA programming guide wich i myself find very usefull and helpull for CUDA.
I believe that one or two of those may help you.
CUDA is for NVidia GPU. Mali is not NVidia's, but ARM's. So you CANNOT use CUDA in your given hardware. Besides, if you want CUDA, you'd better drop Tensorflow-lite and use Tensorflow.
If you want to use CUDA, get a hardware with supported NVidia GPU (e.g., x64 machine with NVidia GPU). Note that you can use Tensorflow-GPU & CUDA/CUDNN in Tizen with x64+NVidia GPU. You just need to be careful on nvidia GPU kernel driver version and userspace driver version. Because NVidia's GPU userspace driver and CUDA/CUDNN are statically built, its Linux drivers are compatible with Tizen. (I've tested tensorflow-gpu, CUDA/CUDNN in Tizen with NVidia driver version 111... probably in winter, 2017)
If you want to use Tizen/Tensorflow-lite in the given hardware, forget CUDA.