Skip to content

Instantly share code, notes, and snippets.

@TimDettmers
Created February 20, 2025 21:46
Show Gist options
  • Save TimDettmers/8b86443825cac5fcf5862c0037721421 to your computer and use it in GitHub Desktop.
Save TimDettmers/8b86443825cac5fcf5862c0037721421 to your computer and use it in GitHub Desktop.
AMD slurm SGLang install (Frontier)
#!/bin/bash
module load rocm/6.2.4
module load libfabric/1.20
module load gcc/11.2.0
export CC=$(which gcc)
export CUDAHOSTCXX=$(which g++)
export CXX=$(which g++)
# pytorch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4
mkdir -p git
cd git
# basic dependencies
python -m pip install ninja cmake wheel pybind11
# triton kernels
pip uninstall -y triton
git clone https://github.com/OpenAI/triton.git
cd triton
git checkout e192dba
cd python
pip3 install .
cd ../..
# rocm-smi
cd ~/
mkdir -p local
cp -r /opt/rocm-6.2.4/share/amd_smi ~/local/amd_smi_local
cd ~/local/amd_smi_local
pip install .
# vllm
cd ~/git/
git clone https://github.com/vllm-project/vllm.git
cd vllm
pip install --upgrade numba scipy huggingface-hub[cli]
pip install "numpy<2"
pip install -r requirements-rocm.txt
export PYTORCH_ROCM_ARCH="gfx90a"
python setup.py develop
pip install transformers==4.48.2
# sglang
cd ..
cd sglang
pip install --upgrade pip
cd sgl-kernel
python setup_rocm.py install
cd ..
pip install --no-deps -e ".[all_hip]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment