Merge pull request #16 from LokiMetaSmith/fix-amd-install

Fix AMD Triton conflict in speedrun.sh
This commit is contained in:
Lawrence R Kincheloe III 2025-11-22 21:40:05 -06:00 committed by GitHub
commit 33b6b800fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"