Finally support for tensorflow on amd gpus

Here’s a quote from the developers:

ROCm Tensorflow 1.8 Release


We are excited to announce the release of ROCm enabled TensorFlow v1.8 for AMD GPUs. This post demonstrates the steps to install and use TensorFlow on AMD GPUs.


First, you’ll need to install the open-source ROCm stack. Details can be found here:

Then, install these other relevant ROCm packages:

sudo apt update
sudo apt install rocm-libs miopen-hip cxlactivitylogger

And finally, install TensorFlow itself (via our pre-built whl package):

sudo apt install wget python3-pip 
pip3 install ./tensorflow-1.8.0-cp35-cp35m-manylinux1_x86_64.whl

Now that TensorFlow is installed, let’s run a few workloads.

Image recognition

We’ll use one of TensorFlow’s tutorials as a quick and easy Inception-v3 image recognition workload:

Here’s how to run it:

cd ~ && git clone
cd ~/models/tutorials/image/imagenet

After, you should see a list of labels with associated scores. Since the above script is for classifying a supplied image of a panda, that’s what the result indicates:

giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca (score = 0.89103)
indri, indris, Indri indri, Indri brevicaudatus (score = 0.00810)
lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens (score = 0.00258)
custard apple (score = 0.00149)
earthstar (score = 0.00141)


For more info have a look at the following links: 1, 2

Leave a Reply

Your email address will not be published. Required fields are marked *