From 8881ea84bfe23c3bf62cd1041e0f0e822b729470 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 03:38:56 +0000 Subject: [PATCH] Fix AMD Triton conflict in speedrun.sh Explicitly uninstall `triton` when AMD GPU is detected. The standard `triton` package (often pulled by NVIDIA dependencies or accident) conflicts with `pytorch-triton-rocm` on AMD systems, causing `ImportError: cannot import name 'Config' from 'triton'`. This change ensures a clean ROCm environment by removing the conflicting package. Also retains the `uv run --extra $EXTRAS` fix from the previous step. --- speedrun.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/speedrun.sh b/speedrun.sh index 9b4f8ae..30a6a3a 100644 --- a/speedrun.sh +++ b/speedrun.sh @@ -32,6 +32,11 @@ if command -v nvidia-smi &> /dev/null; then elif [ -e /dev/kfd ]; then echo "AMD GPU detected. Installing ROCm dependencies..." EXTRAS="amd" + # Explicitly uninstall triton if present, as it conflicts with pytorch-triton-rocm + # and can cause "ImportError: cannot import name 'Config' from 'triton'" errors + # if the NVIDIA version of triton (e.g. 3.4.0) is accidentally installed. + source .venv/bin/activate 2>/dev/null || true + uv pip uninstall -q triton || true else echo "No dedicated GPU detected. Installing CPU dependencies..." EXTRAS="cpu"