mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-28 08:31:25 +00:00
docker : enable rocWMMA in ROCm images, add gfx1151 (#15997)
This commit is contained in:
@@ -17,14 +17,11 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
|
|||||||
# gfx906 is deprecated
|
# gfx906 is deprecated
|
||||||
#check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1/reference/system-requirements.html
|
#check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1/reference/system-requirements.html
|
||||||
|
|
||||||
ARG ROCM_DOCKER_ARCH='gfx803,gfx900,gfx906,gfx908,gfx90a,gfx942,gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102,gfx1200,gfx1201'
|
ARG ROCM_DOCKER_ARCH='gfx803;gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1010;gfx1030;gfx1032;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201;gfx1151'
|
||||||
#ARG ROCM_DOCKER_ARCH=gfx1100
|
#ARG ROCM_DOCKER_ARCH='gfx1151'
|
||||||
|
|
||||||
# Set ROCm architectured
|
# Set ROCm architectures
|
||||||
ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
|
ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
|
||||||
# Enable ROCm
|
|
||||||
# ENV CC=/opt/rocm/llvm/bin/clang
|
|
||||||
# ENV CXX=/opt/rocm/llvm/bin/clang++
|
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
@@ -39,8 +36,16 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN git clone https://github.com/rocm/rocwmma --branch develop --depth 1
|
||||||
|
|
||||||
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
|
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
|
||||||
cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=$ROCM_DOCKER_ARCH -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
|
cmake -S . -B build \
|
||||||
|
-DGGML_HIP=ON \
|
||||||
|
-DGGML_HIP_ROCWMMA_FATTN=ON \
|
||||||
|
-DCMAKE_HIP_FLAGS="-I$(pwd)/rocwmma/library/include/" \
|
||||||
|
-DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
|
||||||
|
-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
|
||||||
&& cmake --build build --config Release -j$(nproc)
|
&& cmake --build build --config Release -j$(nproc)
|
||||||
|
|
||||||
RUN mkdir -p /app/lib \
|
RUN mkdir -p /app/lib \
|
||||||
|
|||||||
Reference in New Issue
Block a user