I wanted to start experimenting with AI for a while.
At work, I didn't really have enough time to properly explore this new ecosystem and understand how these tools could be used. But I had another resource available: my personal hardware.
I'm a gamer, so I have a reasonably powerful desktop PC. I'm also a developer, with a laptop running Ubuntu and a NAS.
That made me wonder:
Can I use my gaming PC to run AI models locally?
The answer is yes.
This article is a small walkthrough of my experience setting up a local AI environment using an AMD Radeon GPU, Windows, WSL, ROCm, and Ollama.
My hardware is (yes, I'm Team Red):
The first step is to make sure that WSL is installed and up to date.
The general process is:
From PowerShell:
wsl -v
wsl --update
wsl --install -d Ubuntu
wsl -d Ubuntu
wsl --terminate Ubuntu
wsl --unregister Ubuntu
Once Ubuntu is installed, update the system and install zstd
.
We will need it later to extract Ollama.
sudo apt update
sudo apt upgrade
sudo apt autoclean
sudo apt autoremove
sudo apt install zstd
Ollama is the foundation of this setup.
It allows us to download and run AI models locally while providing different compute backends, including CPU, CUDA, and ROCm.
One thing that wasn't immediately obvious to me was that Ollama provides a specific ROCm backend.
The installation is split into two parts:
curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \
| sudo tar --zstd -x -C /usr
curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst \
| sudo tar --zstd -x -C /usr
Then create the Ollama user and add your current user to the Ollama group:
sudo useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
sudo usermod -a -G ollama $(whoami)
The official documentation I used:
https://docs.ollama.com/linux#manual-install
https://docs.ollama.com/linux#amd-gpu-install
I chose to run Ollama as a systemd service.
Create or edit the service configuration:
sudo nano /etc/systemd/system/ollama.service
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=$PATH"
Environment="HSA_ENABLE_DXG_DETECTION=1"
Environment="OLLAMA_HOST=0.0.0.0:11434"
[Install]
WantedBy=default.target
Then reload systemd and start the service:
sudo systemctl daemon-reload
sudo systemctl enable ollama
sudo systemctl start ollama.service
sudo systemctl status ollama.service
More information about running Ollama as a service:
https://docs.ollama.com/linux#adding-ollama-as-a-startup-service-recommended
The GPU needs to be exposed to the WSL environment.
For my setup, I used librocdxg
.
One important detail: version 1.2.2 solved an issue I encountered with version 1.2.0.
So, if you're having issues with GPU detection, the version may matter.
wget https://github.com/ROCm/librocdxg/releases/download/v1.2.2/rocdxg-roct_1.2.2_amd64.deb
sudo apt install ./rocdxg-roct_1.2.2_amd64.deb
More information about the project:
https://github.com/ROCm/librocdxg
At this point, everything should be configured.
Restart Ollama:
sudo systemctl restart ollama.service
Then check the Ollama logs:
sudo journalctl -u ollama --no-pager -o cat | grep "inference compute"
You should see something similar to:
library=ROCm compute=gfxXXXX description="[NAME_OF_YOUR_GPU]"
The important part is:
library=ROCm
You don't want Ollama to silently fall back to CPU inference.
In my case, I get:
time=2026-08-28T12:38:20.900+02:00 level=INFO source=types.go:32 msg="inference compute" id=0 filter_id=0 library=ROCm compute=gfx1200 name=ROCm0 description="AMD Radeon RX 9060 XT" libdirs=ollama,rocm_v7_2 driver=0.0 pci_id=0000:2b:00.0 type=discrete total="15.9 GiB" available="14.2 GiB"
As you can see, Ollama detects:
gfx1200
.AMD provides a compatibility matrix to identify which gfx
version corresponds to your GPU:
I also found references suggesting that it may be possible to enable support for some older gfx
versions, but I didn't need to do this for my setup.
Time for the interesting part.
Download and run a model:
ollama run qwen3:8b
Ask the model something and let it generate a response.
You can exit the interactive session with:
/bye
You can then check where the model is running:
ollama ps
The output should indicate that the model is running on the GPU.
NAME ID SIZE PROCESSOR
qwen3:8b xxxxxxxxxxxx 5.2 GB 100% GPU
You can also open the Windows Task Manager and monitor your GPU usage.
Once the model starts running, you should see:
By default, your Ollama instance is running inside WSL.
If you want to access it from other machines on your local network, you need to expose the port through Windows.
On the Windows host, open PowerShell as Administrator.
First, create a firewall rule:
New-NetFirewallRule `
-DisplayName "Ollama WSL LAN" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 11434 `
-Action Allow `
-RemoteAddress [IP_BASE_TO_LISTEN]/24
Then forward the port between Windows and WSL:
netsh interface portproxy add v4tov4 `
listenaddress=[IP_HOST_WSL] `
listenport=11434 `
connectaddress=[IP_UBUNTU_IMAGE] `
connectport=11434
From another computer on your local network, you can test the Ollama API with:
curl.exe http://[IP_OF_OLLAMA_HOST]:11434/api/tags
If everything is configured correctly, Ollama should respond with the list of installed models.
By default, WSL may stop after some time when no active terminal is connected.
To keep the WSL environment alive, create a .wslconfig
file in your Windows user profile directory.
Add:
[general]
instanceIdleTimeout=-1
After modifying the configuration, restart the WSL distribution so the configuration is taken into account
Now once you started the image you will need to kill it manually.
wsl --terminate Ubuntu
I encountered one additional issue.
After restarting my PC, I could start the WSL distribution, but Ollama was no longer accessible from the local network.
In my case, restarting the Windows iphlpsvc
service solved the problem.
Open PowerShell as Administrator:
Restart-Service iphlpsvc -Force
After that, Ollama became accessible again.
This setup allowed me to turn my gaming PC into a local AI machine without replacing Windows or dedicating the entire computer to Linux.
The combination of:
provides a relatively convenient environment for experimenting with local AI models.
The most important part of the setup, in my experience, was making sure that Ollama was actually using the ROCm backend and the GPU.
Once that was working, running a model such as qwen3:8b
was straightforward.
Hopefully, this will save some time for other AMD GPU users who want to experiment with local AI on Windows.