mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
Move triton uninstall after uv sync in speedrun.sh for AMD
This commit is contained in:
parent
33b6b800fa
commit
994491b28d
12
speedrun.sh
12
speedrun.sh
|
|
@ -32,11 +32,6 @@ 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"
|
||||
|
|
@ -46,6 +41,13 @@ uv sync --extra $EXTRAS
|
|||
# activate venv so that `python` uses the project's venv instead of system python
|
||||
source .venv/bin/activate
|
||||
|
||||
# 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.
|
||||
if [ "$EXTRAS" == "amd" ]; then
|
||||
uv pip uninstall -q triton || true
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# wandb setup
|
||||
# If you wish to use wandb for logging (it's nice!, recommended).
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user