diff --git a/toolboxes/Dockerfile.rocm-7.2 b/toolboxes/Dockerfile.rocm-7.2 index f4c0879..bc0468f 100644 --- a/toolboxes/Dockerfile.rocm-7.2 +++ b/toolboxes/Dockerfile.rocm-7.2 @@ -36,6 +36,9 @@ ENV ROCM_PATH=/opt/rocm \ WORKDIR /opt/llama.cpp RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . +# Temporary workaround for ROCm 7 performance regression (https://github.com/ROCm/rocm-systems/issues/2865#issuecomment-3846679806) +ENV HIP_LLVM_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600" + # build RUN git clean -xdf \ && git submodule update --recursive \ diff --git a/toolboxes/Dockerfile.rocm7-nightlies b/toolboxes/Dockerfile.rocm7-nightlies index 2a0f997..d0c0eaf 100644 --- a/toolboxes/Dockerfile.rocm7-nightlies +++ b/toolboxes/Dockerfile.rocm7-nightlies @@ -57,6 +57,9 @@ RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . \ && git clean -xdf \ && git submodule update --recursive +# Temporary workaround for ROCm 7 performance regression (https://github.com/ROCm/rocm-systems/issues/2865#issuecomment-3846679806) +ENV HIP_LLVM_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600" + RUN cmake -S . -B build \ -DGGML_HIP=ON \ -DAMDGPU_TARGETS=gfx1151 \