attempting other ways to apply LLVM patch to rocm7

This commit is contained in:
Donato Capitella
2026-02-04 16:59:43 +00:00
parent bd8069fe2f
commit 606bc292b9
2 changed files with 3 additions and 6 deletions
+1 -3
View File
@@ -36,14 +36,12 @@ ENV ROCM_PATH=/opt/rocm \
WORKDIR /opt/llama.cpp WORKDIR /opt/llama.cpp
RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . 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 # build
RUN git clean -xdf \ RUN git clean -xdf \
&& git submodule update --recursive \ && git submodule update --recursive \
&& cmake -S . -B build \ && cmake -S . -B build \
-DGGML_HIP=ON \ -DGGML_HIP=ON \
-DCMAKE_HIP_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600" \
-DAMDGPU_TARGETS=gfx1151 \ -DAMDGPU_TARGETS=gfx1151 \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DGGML_RPC=ON \ -DGGML_RPC=ON \
+2 -3
View File
@@ -33,8 +33,7 @@ ENV ROCM_PATH=/opt/rocm-7.0 \
LD_LIBRARY_PATH=/opt/rocm-7.0/lib:/opt/rocm-7.0/lib64:/opt/rocm-7.0/llvm/lib \ LD_LIBRARY_PATH=/opt/rocm-7.0/lib:/opt/rocm-7.0/lib64:/opt/rocm-7.0/llvm/lib \
LIBRARY_PATH=/opt/rocm-7.0/lib:/opt/rocm-7.0/lib64 \ LIBRARY_PATH=/opt/rocm-7.0/lib:/opt/rocm-7.0/lib64 \
CPATH=/opt/rocm-7.0/include \ CPATH=/opt/rocm-7.0/include \
PKG_CONFIG_PATH=/opt/rocm-7.0/lib/pkgconfig \ PKG_CONFIG_PATH=/opt/rocm-7.0/lib/pkgconfig
HIP_CLANG_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600"
RUN printf '%s\n' \ RUN printf '%s\n' \
'export ROCM_PATH=/opt/rocm-7.0' \ 'export ROCM_PATH=/opt/rocm-7.0' \
@@ -49,7 +48,6 @@ RUN printf '%s\n' \
'export LIBRARY_PATH="$HIP_LIB_PATH:$ROCM_PATH/lib:$ROCM_PATH/lib64"' \ 'export LIBRARY_PATH="$HIP_LIB_PATH:$ROCM_PATH/lib:$ROCM_PATH/lib64"' \
'export CPATH="$HIP_INCLUDE_PATH"' \ 'export CPATH="$HIP_INCLUDE_PATH"' \
'export PKG_CONFIG_PATH="$ROCM_PATH/lib/pkgconfig"' \ 'export PKG_CONFIG_PATH="$ROCM_PATH/lib/pkgconfig"' \
'export HIP_LLVM_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600"' \
> /etc/profile.d/rocm.sh \ > /etc/profile.d/rocm.sh \
&& chmod +x /etc/profile.d/rocm.sh \ && chmod +x /etc/profile.d/rocm.sh \
&& echo 'source /etc/profile.d/rocm.sh' >> /etc/bashrc && echo 'source /etc/profile.d/rocm.sh' >> /etc/bashrc
@@ -63,6 +61,7 @@ RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . \
RUN cmake -S . -B build \ RUN cmake -S . -B build \
-DGGML_HIP=ON \ -DGGML_HIP=ON \
-DCMAKE_HIP_FLAGS="-mllvm --amdgpu-unroll-threshold-local=600" \
-DAMDGPU_TARGETS=gfx1151 \ -DAMDGPU_TARGETS=gfx1151 \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DGGML_RPC=ON \ -DGGML_RPC=ON \