11ARG UBUNTU_VERSION=24.04
22
33# This needs to generally match the container host's environment.
4- ARG ROCM_VERSION=6.4
5- ARG AMDGPU_VERSION=6.4
4+ ARG ROCM_VERSION=7.0
5+ ARG AMDGPU_VERSION=7.0
66
7- # Target the CUDA build image
7+ # Target the ROCm build image
88ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99
1010# ## Build image
@@ -13,18 +13,14 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1313# Unless otherwise specified, we make a fat build.
1414# List from https://github.com/ggml-org/llama.cpp/pull/1087#issuecomment-1682807878
1515# This is mostly tied to rocBLAS supported archs.
16- # gfx803, gfx900, gfx1032, gfx1101, gfx1102,not officialy supported
17- # gfx906 is deprecated
18- # check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.2.4/reference/system-requirements.html
16+ # gfx803, gfx900, gfx906, gfx1032, gfx1101, gfx1102,not officialy supported
17+ # check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1/reference/system-requirements.html
1918
20- ARG ROCM_DOCKER_ARCH='gfx803, gfx900, gfx906, gfx908, gfx90a, gfx942, gfx1010, gfx1030, gfx1032, gfx1100, gfx1101, gfx1102'
21- # ARG ROCM_DOCKER_ARCH=gfx1100
19+ ARG ROCM_DOCKER_ARCH='gfx803; gfx900; gfx906; gfx908; gfx90a; gfx942; gfx1010; gfx1030; gfx1032; gfx1100; gfx1101; gfx1102;gfx1200;gfx1201;gfx1151 '
20+ # ARG ROCM_DOCKER_ARCH='gfx1151'
2221
23- # Set nvcc architectured
22+ # Set ROCm architectures
2423ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
25- # Enable ROCm
26- # ENV CC=/opt/rocm/llvm/bin/clang
27- # ENV CXX=/opt/rocm/llvm/bin/clang++
2824
2925RUN apt-get update \
3026 && apt-get install -y \
@@ -40,11 +36,16 @@ WORKDIR /app
4036COPY . .
4137
4238RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
43- 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 \
39+ cmake -S . -B build \
40+ -DGGML_HIP=ON \
41+ -DGGML_HIP_ROCWMMA_FATTN=ON \
42+ -DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
43+ -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
44+ -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
4445 && cmake --build build --config Release -j$(nproc)
4546
4647RUN mkdir -p /app/lib \
47- && find build -name "*.so" -exec cp {} /app/lib \;
48+ && find build -name "*.so* " -exec cp -P {} /app/lib \;
4849
4950RUN mkdir -p /app/full \
5051 && cp build/bin/* /app/full \
0 commit comments