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=6.3
5+ ARG AMDGPU_VERSION=6.3
66
7- # Target the ROCm build image
7+ # Target the CUDA build image
88ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
99
1010# ## Build image
@@ -15,13 +15,16 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1515# This is mostly tied to rocBLAS supported archs.
1616# gfx803, gfx900, gfx1032, gfx1101, gfx1102,not officialy supported
1717# gfx906 is deprecated
18- # check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.4.1 /reference/system-requirements.html
18+ # check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.2.4 /reference/system-requirements.html
1919
20- ARG ROCM_DOCKER_ARCH='gfx803; gfx900; gfx906; gfx908; gfx90a; gfx942; gfx1010; gfx1030; gfx1032; gfx1100; gfx1101; gfx1102;gfx1200;gfx1201;gfx1151 '
21- # ARG ROCM_DOCKER_ARCH='gfx1151'
20+ ARG ROCM_DOCKER_ARCH='gfx803, gfx900, gfx906, gfx908, gfx90a, gfx942, gfx1010, gfx1030, gfx1032, gfx1100, gfx1101, gfx1102'
21+ # ARG ROCM_DOCKER_ARCH=gfx1100
2222
23- # Set ROCm architectures
23+ # Set nvcc architectured
2424ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
25+ # Enable ROCm
26+ # ENV CC=/opt/rocm/llvm/bin/clang
27+ # ENV CXX=/opt/rocm/llvm/bin/clang++
2528
2629RUN apt-get update \
2730 && apt-get install -y \
@@ -36,16 +39,8 @@ WORKDIR /app
3639
3740COPY . .
3841
39- RUN git clone https://github.com/rocm/rocwmma --branch develop --depth 1
40-
4142RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
42- cmake -S . -B build \
43- -DGGML_HIP=ON \
44- -DGGML_HIP_ROCWMMA_FATTN=ON \
45- -DCMAKE_HIP_FLAGS="-I$(pwd)/rocwmma/library/include/" \
46- -DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
47- -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
48- -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
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 \
4944 && cmake --build build --config Release -j$(nproc)
5045
5146RUN mkdir -p /app/lib \
0 commit comments