Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 10, 2024
1 parent db19114 commit baf5304
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions benchmarks/rlhf/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ trl
accelerate
transformers
datasets
einops
1 change: 1 addition & 0 deletions benchmarks/rlhf/requirements.rocm.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions scripts/article/run_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ else
export MILABENCH_CONFIG="$MILABENCH_SOURCE/config/standard.yaml"
fi


export GPU="$(/opt/rocm/lib/llvm/bin/amdgpu-arch | head -n 1)"
export TORCH_ROCM_ARCH_LIST="$GPU"
export ROCM_TARGETS="$GPU"
export PYTORCH_ROCM_ARCH="$GPU"


ARGS="$@"

install_prepare() {
Expand Down Expand Up @@ -68,21 +75,26 @@ install_prepare() {

# https://github.com/ROCm/jax/releases/tag/rocm-jaxlib-v0.4.30
pip install https://github.com/ROCm/jax/releases/download/rocm-jaxlib-v0.4.30/jaxlib-0.4.30+rocm611-cp310-cp310-manylinux2014_x86_64.whl
pip install https://github.com/ROCm/jax/archive/refs/tags/rocm-jaxlib-v0.4.30.tar.gz
pip install https://github.com/ROCm/jax/archive/refs/tags/rocm-jaxlib-v0.4.30.tar.g

#
FORCE_ONLY_CUDA=1 pip install -U -v --no-build-isolation git+https://github.com/rusty1s/pytorch_cluster.git
FORCE_ONLY_CUDA=1 pip install -U -v --no-build-isolation git+https://github.com/rusty1s/pytorch_scatter.git
FORCE_ONLY_CUDA=1 pip install -U -v --no-build-isolation git+https://github.com/rusty1s/pytorch_sparse.git
pip uninstall torch_cluster torch_scatter torch_sparse -y
FORCE_ONLY_CUDA=1 pip install -U -v --use-pep517 --no-build-isolation git+https://github.com/rusty1s/pytorch_cluster.git
FORCE_ONLY_CUDA=1 pip install -U -v --use-pep517 --no-build-isolation git+https://github.com/rusty1s/pytorch_scatter.git
FORCE_ONLY_CUDA=1 pip install -U -v --use-pep517 --no-build-isolation git+https://github.com/rusty1s/pytorch_sparse.git

# takes forever to compile
# https://github.com/ROCm/xformers
pip uninstall xformers
pip install xformers --index-url https://download.pytorch.org/whl/rocm6.1
# pip install -v -U --no-build-isolation --no-deps git+https://github.com/ROCm/xformers.git@develop#egg=xformers
# pip install -v -U --no-build-isolation --no-deps git+https://github.com/facebookresearch/xformers.git
# pip install xformers -U --index-url https://download.pytorch.org/whl/rocm6.1

pip uninstall flash-attention
pip install -v -U --no-build-isolation --use-pep517 --no-deps git+https://github.com/ROCm/flash-attention.git
pip uninstall pynvml nvidia-ml-py -y

pip install einops
)

pip uninstall pynvml nvidia-ml-py -y
Expand All @@ -99,7 +111,9 @@ else
. $MILABENCH_WORDIR/env/bin/activate
fi

cd $MILABENCH_WORDIR

milabench prepare $ARGS

#
# Run the benchmakrs
milabench run $ARGS
Expand Down

0 comments on commit baf5304

Please sign in to comment.