Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Santa Clara desk5 min

How to Install TensorFlow with ROCm on Ubuntu 24.04 for AMD GPUs (2026 Guide)

To get TensorFlow using an AMD GPU on Ubuntu 24.04, use AMD's ROCm-specific TensorFlow image or package, match the versions to AMD's compatibility matrix, and confirm the GPU is visible from inside the environment you will actually run.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To run TensorFlow on an AMD GPU on Ubuntu 24.04, you need AMD’s ROCm-enabled TensorFlow, either as a prebuilt Docker image or as a ROCm-specific pip package. The ordinary pip install tensorflow does not give you AMD GPU acceleration. A successful import is not enough either: the test that matters is whether TensorFlow lists your GPU and runs an operation on it.

Why the standard TensorFlow install does not use an AMD GPU

TensorFlow’s general pip installation guide describes GPU support in terms of CUDA-enabled NVIDIA cards, using the tensorflow[and-cuda] extra. TensorFlow’s own tf.test.is_built_with_rocm API documentation states that the official TensorFlow binary is not built with ROCm support. Installing the CUDA extra on an AMD system does not switch on ROCm.

As an Amazon Associate I earn from qualifying purchases.

For AMD hardware, the authoritative steps come from AMD’s ROCm AI Ecosystem guide, “Install TensorFlow for ROCm,” which was current when checked in early October 2026. That guide documents two routes: a ready-made Docker image and a pip install into a Python virtual environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check compatibility before you install anything

ROCm, TensorFlow, Python, the Ubuntu release and kernel, and your GPU model all have to match. Confirm each item against AMD’s current ROCm compatibility matrix and the TensorFlow install page before you start:

#1 Best Overall
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • 0dB technology lets you enjoy light gaming in relative silence
  • Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
  • Dual ball fan bearings last up to twice as long as sleeve bearing designs
  • GPU model: Look up your exact card in AMD’s matrix. The GPU architecture names shown in AMD’s examples (such as gfx90a, gfx942, and gfx950) are examples of named targets, not a list of every supported Radeon or Instinct card.
  • Operating system: Ubuntu 24.04 appears in AMD’s compatibility entries for supported ROCm releases. Check the point release and kernel rules listed for your ROCm version, because support is release-specific.
  • ROCm version: AMD’s TensorFlow examples use ROCm 10.0.0 for the pip packages and ROCm 7.14.1 for the container tag. Use the pairing that AMD lists for your hardware.
  • TensorFlow version: AMD’s current examples cover TensorFlow 2.21, 2.20, and 2.19.1.
  • Python version: AMD’s examples use Python 3.12, which is the default on Ubuntu 24.04.

Version names change quickly. Treat these numbers as the examples on AMD’s page as of October 2026, and use the live page for your install.

Option A: AMD’s TensorFlow ROCm container

The container is the most direct route. It packages TensorFlow, Python, and the ROCm libraries together, so you do not have to build a matching host environment for the framework. The image tag encodes the ROCm and framework versions. For example, AMD’s current Ubuntu 24.04 example is rocm/tensorflow:rocm7.14.1-ubuntu24.04-py3.12-tf2.21.

  1. Confirm that Docker is installed and that your user can run it without sudo, or prefix the commands with sudo.
  2. Confirm that the host ROCm driver stack can see your GPU. The container uses the host kernel driver, so this must work on the host first.
  3. Pull the image: docker pull rocm/tensorflow:rocm7.14.1-ubuntu24.04-py3.12-tf2.21
  4. Start the container with AMD’s docker run example. The essential device flags are --device /dev/kfd and --device /dev/dri. AMD’s example also sets host IPC and network options and adds the container user to the video group. Copy the complete command from AMD’s page rather than building a shorter version.
  5. Inside the container, run the verification steps in the section below.

Pulling the image alone does not expose the GPU. Without the device flags and group access, the container starts but TensorFlow will not see the card.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • Phase-change GPU thermal pad helps ensure optimal heat transfer, lowering GPU temperatures for enhanced performance and reliability
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • Dual-ball fan bearings last up to twice as long as standard conventional sleeve bearings designs
  • 0dB technology lets you enjoy light gaming in relative silence

Option B: pip in a Python virtual environment

Use this route when you need a native Python environment, for example to install other packages next to TensorFlow or to run the code outside Docker. AMD’s example uses Python 3.12.

  1. Confirm that ROCm is installed and working on the host, as AMD’s page requires before the pip install.
  2. Create and activate a virtual environment: python3.12 -m venv .venv, then source .venv/bin/activate.
  3. Install the ROCm-enabled TensorFlow package from AMD’s package index, using the exact command on AMD’s page. The package pins for AMD’s ROCm 10.0.0 examples are tensorflow-rocm==2.21.0+rocm10.0.0, tensorflow-rocm==2.20.0+rocm10.0.0, and tensorflow-rocm==2.19.1+rocm10.0.0. Copy the index option from AMD’s page; a plain pip install tensorflow will fetch the wrong build.
  4. Run the verification steps below inside the same activated environment.

Verify that TensorFlow is using your AMD GPU

Start with device visibility. TensorFlow’s documented check is tf.config.list_physical_devices('GPU'). Run it inside the container or the activated virtual environment where you will work:

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

Rank #3
Sale
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
  • Powered by Radeon RX 9070 XT
  • WINDFORCE Cooling System
  • Hawk Fan
  • Server-grade Thermal Conductive Gel
  • RGB Lighting

A non-empty list confirms that TensorFlow can see a GPU. It does not show that your code runs on the GPU, so follow it with a small placed operation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))
with tf.device('/GPU:0'):
    a = tf.random.normal([2000, 2000])
    b = tf.random.normal([2000, 2000])
    c = tf.matmul(a, b)
print(float(tf.reduce_sum(c)))

This test confirms that the operation completes on the device TensorFlow lists as /GPU:0. It is a functional check, not a benchmark. Use AMD’s page for any additional checks that depend on the packaging you chose.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting: where the failure usually sits

Most failures sit at one of three boundaries. Check them in this order:

Rank #4
ASUS Prime Radeon RX 9060 XT 16GB GDDR6 OC Edition Gaming Graphics Card
  • OC mode (GPU Tweak III): up to 3330 MHz (Boost Clock)/up to 2760 MHz (Game Clock) Default mode: up to 3310 MHz (Boost Clock)/up to 2740 MHz (Game Clock)
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • Dual-ball fan bearings last up to twice as long as standard conventional sleeve bearings designs
  • 0dB technology lets you enjoy light gaming in relative silence
  • Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
  • Host GPU access fails. If the GPU is not usable on the host, TensorFlow cannot use it either. Fix the ROCm driver and GPU setup on the host first, then return to the container or environment steps.
  • The container starts but sees no GPU. Check that the run command includes --device /dev/kfd, --device /dev/dri, and the group access from AMD’s example. A container started from a shortened command is the most common cause.
  • The pip environment imports TensorFlow but lists no GPU. The package is probably a non-ROCm build or does not match your ROCm version. Recreate the virtual environment with Python 3.12 and install the exact ROCm package and index from AMD’s page. Avoid mixing in system-wide packages from apt.

Also check that your exact GPU model appears in AMD’s compatibility matrix for the ROCm version you installed. An Ubuntu 24.04 system with an unsupported card will fail even when every software version matches.

Choosing between the container and pip routes

Factor Docker container (Option A) Python virtual environment with pip (Option B)
Setup repeatability High; the image bundles framework and library versions Depends on host ROCm and the exact pip command used
Matching AMD’s tested tags Direct; use the image tag from AMD’s page Direct; use the package pins from AMD’s page
Managing a Python environment Limited to what the image provides Full control with venv and pip
Host GPU access requirements Device nodes and group access must be passed to the container Host ROCm must work for the user running Python
Pinning versions for a project Pin by image tag Pin by package version and Python version
Speed or reliability Not stated in AMD’s installation material Not stated in AMD’s installation material

The table lists setup characteristics only. AMD’s installation material does not compare the two routes for speed or reliability, so neither route should be presented as faster.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical notes for AMD’s examples

The GPU names and version numbers on AMD’s page describe its examples as of October 2026. Their purpose is to show how the naming works, not to certify every card or release. A future ROCm or TensorFlow release may replace them, so when you install, read the matrix and the install page first and use their current commands.

Quick Recap

Bestseller No. 1
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$529.00
SaleBestseller No. 2
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$831.99
SaleBestseller No. 3
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
Powered by Radeon RX 9070 XT; WINDFORCE Cooling System; Hawk Fan; Server-grade Thermal Conductive Gel
$814.28
Bestseller No. 4
ASUS Prime Radeon RX 9060 XT 16GB GDDR6 OC Edition Gaming Graphics Card
ASUS Prime Radeon RX 9060 XT 16GB GDDR6 OC Edition Gaming Graphics Card
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$819.00

“

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.