ROCm Doctor
Given a "ROCm / PyTorch / llama.cpp isn't working on my AMD GPU" complaint,
identify which known misconfiguration is the cause and either fix it (with
consent) or hand back the exact next step.
This skill does
not probe or reason on its own. The
CLI owns the
probe, the closed failure-mode catalog, and the fixes; the skill just drives it
and relays the results. The catalog is a
closed list — if the symptom
doesn't match a known mode, route the user upstream instead of guessing.
Scope gate — check before anything else
Read the user's symptom and answer one question first: is this an AMD GPU?
If it is not — an NVIDIA / Intel / Apple GPU — then stop and decline:
- Say plainly that it is out of scope for this skill and why (not an AMD GPU).
- Give no troubleshooting for it: no commands to run, no driver or CUDA
advice, no diagnostic checklist, no "try this first" — not even generic GPU
suggestions. Point at the vendor's own docs and stop there.
- Do not run / / .
Being helpful here means being honest about the boundary — confidently-wrong
advice for a stack this skill does not cover is worse than no advice. Only
continue past this gate when the GPU is AMD. See
Out of scope.
WSL2 is in scope and does not stop this gate. It is a platform family of its
own, with its own catalog entries covering
, the DXCore handoff,
ROCDXG, the distro floor, the Windows host driver and WSL 1. Do not decline a
WSL2 user or route them away untouched — run the workflow as for any other
platform. The CLI scopes entries itself, so a bare-metal Linux fix is never
offered there.
Prerequisites
- The CLI. This skill is only a driver over it; Phase 0 below installs
it with the user's consent if fails. Nothing else here is
assumed — the CLI does the probing.
- Platform: native Linux (in-tree module + ), Windows
(HIP SDK), or WSL2 ( + the Windows host driver). NVIDIA/Intel/Apple
GPUs and clean-machine installs are out of scope (see
Out of scope).
- No fixed ROCm version, GPU arch (), or container image is assumed —
/ detect the installed ROCm, the GPU's target, and
container context, and match fixes to what they find. Never hand-set
(or similar footgun env vars) yourself; let the CLI
decide.
Workflow
Only start here once the
Scope gate
passes — the GPU is AMD. Linux, Windows and WSL2 all run the same workflow.
-
Ensure the CLI is present. Everything below shells out to it, so
check first and install it if missing:
If that succeeds, skip to step 1. If it's not found, install it
with the
user's consent (this fetches and runs an installer that drops the
and
binaries into
). Both installers default to the
channel, so no channel argument is needed:
- Linux (x86_64 only):
curl -fsSL https://raw.githubusercontent.com/ROCm/rocm-cli/main/install.sh | sh
- Windows (PowerShell):
irm https://raw.githubusercontent.com/ROCm/rocm-cli/main/install.ps1 | iex
There is no macOS build.
refuses anything but Linux x86_64, so
on any other host hand the user the install page and stop rather than
suggesting the command anyway. To pin an unreleased build instead, pass
(
, or
$env:ROCM_CLI_CHANNEL = "nightly"
).
After install, confirm
is on
and re-run
.
If it still isn't available, hand the user the install page
(
https://github.com/ROCm/rocm-cli) and stop.
-
Diagnose. Pass the user's error text as the symptom:
rocm diagnose --symptom "<paste the exact error>" --json
Read the JSON:
- — the gate. True means a cause cleared the threshold and
you may propose a fix; false means nothing was established, so route
upstream. Do not substitute "is empty?": several checkers
open with a nonzero base score for a merely potentially relevant
situation (a container, an APU beside a discrete GPU), so a healthy host
still returns a non-empty of sub-threshold entries. Gating on
emptiness proposes a fix for a machine with nothing wrong.
- — ranked causes, each with , , (0–100),
, and a (with , , , ,
, and the / / /
flags). = high confidence; = likely
(confirm one more piece of evidence with the user first).
- — set only when the host's platform family has no catalog
entries at all. Linux, Windows and WSL2 are all covered, so this does
not fire for WSL2. When it is set, nothing was checked — say so rather
than implying the machine looks fine. First, if the user's symptom clearly
names an app that ships its own runtime (Lemonade, Ollama, LM Studio),
route them to that app's tracker (see
Framework routing) — those trackers apply regardless
of platform. Otherwise relay the message and stop.
- — when is false, hand the user this
upstream tracker; do not speculate. Note the CLI picks this target from
the host-detected framework, not from the symptom text — so for an app
named only in the symptom, route it yourself per
Framework routing.
-
Propose the fix. Show the top match's
,
, plan, and
command. Only propose applying it when the user is on board.
-
Apply with consent. For an auto-applicable fix:
rocm fix <fix-id> # auto fixes: prompt before changing anything
rocm fix <fix-id> --dry-run # show the exact change, touch nothing
rocm fix <fix-id> --yes # required to apply in a non-interactive shell
Only the four auto-applicable fixes are ones the CLI runs itself. The other 22
are
print-only (bootloader, kernel, reinstall, Windows driver, …):
just prints the plan for the user to run themselves — no prompt, and
the CLI never performs those.
Of the four, two do not always mutate:
- mutates on Windows only. On Linux it reports
where the override is set and which rc files carry it, then stops — it
will not edit the user's dotfiles. So there is no prompt to answer and
nothing for to preview. Tell the Linux user what to edit; do
not describe it as a change the CLI made or previewed.
- mutates only when is passed.
Without it — on either platform — the runner just prints the
/ query that identifies the discrete GPU's index and
returns 0; there is no prompt, no preview, and nothing is
pinned. Once the user knows N, re-run with
rocm fix fix-9-igpu-dgpu --device-index N
.
-
Verify. Have the user run the
command from the diagnosis.
Use
(or
) when you only need the host state
(GPU, driver, ROCm install, groups, framework) without a diagnosis.
Framework routing
covers frameworks that build against the
system ROCm/HIP:
- PyTorch, llama.cpp — in scope; diagnose normally.
Apps that ship their
own ROCm runtime aren't diagnosed here — route the user
to the right tracker. This routing is
yours, not the CLI's: the host probe
reports only
,
or
, so
can
never name one of these apps. Use the list below.
- Lemonade → https://github.com/lemonade-sdk/lemonade/issues
- Ollama → https://github.com/ollama/ollama/issues
- LM Studio → in-app support (no public repo)
- Anything else with no catalog match → ROCm core:
https://github.com/ROCm/ROCm/issues (this is what
returns by default).
Out of scope
- NVIDIA / Intel / Apple Silicon GPUs, and fresh installs on a clean
machine (a setup task, not a diagnosis). Exit cleanly and say so.
WSL2 is not in this list. It is a supported platform family with its own
catalog entries — see reference.md.
Rules
- Never run the workflow — or offer any troubleshooting, generic GPU fixes
included — for a non-AMD GPU. State it is out of scope and stop. This does
not apply to WSL2, which is in scope and runs the normal workflow.
- Never invent a fix. If returns no match, route upstream.
- Never run a mutating fix without the user's explicit OK; prefer
first. New failure modes are added to the CLI catalog, not improvised here.
See reference.md for the full closed catalog and the CLI
command/exit-code reference.