Skip to content

Commit 1fe4e38

Browse files
authored
ci: Properly install rocwmma for hip builds (ggml-org#16305)
* CI: Properly install rocwmma for hip builds on windows we now windows install rocwmma from ubuntu pacakges * CI: update linux rocm docker build to use rocm 7.0
1 parent 4201dea commit 1fe4e38

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

.devops/rocm.Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ARG 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

77
# Target the ROCm build image
88
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
@@ -13,11 +13,10 @@ 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.4.1/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;gfx1200;gfx1201;gfx1151'
19+
ARG ROCM_DOCKER_ARCH='gfx803;gfx900;gfx906;gfx1010;gfx1030;gfx1032;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201;gfx1151'
2120
#ARG ROCM_DOCKER_ARCH='gfx1151'
2221

2322
# Set ROCm architectures
@@ -36,13 +35,10 @@ WORKDIR /app
3635

3736
COPY . .
3837

39-
RUN git clone https://github.com/rocm/rocwmma --branch develop --depth 1
40-
4138
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
4239
cmake -S . -B build \
4340
-DGGML_HIP=ON \
4441
-DGGML_HIP_ROCWMMA_FATTN=ON \
45-
-DCMAKE_HIP_FLAGS="-I$(pwd)/rocwmma/library/include/" \
4642
-DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
4743
-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
4844
-DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ jobs:
487487
id: depends
488488
run: |
489489
sudo apt-get update
490-
sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libcurl4-openssl-dev
490+
sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libcurl4-openssl-dev rocwmma-dev
491491
492492
- name: ccache
493493
uses: ggml-org/[email protected]
@@ -1097,10 +1097,12 @@ jobs:
10971097
id: checkout
10981098
uses: actions/checkout@v4
10991099

1100-
- name: Clone rocWMMA repository
1101-
id: clone_rocwmma
1100+
- name: Grab rocWMMA package
1101+
id: grab_rocwmma
11021102
run: |
1103-
git clone https://github.com/rocm/rocwmma --branch rocm-${{ env.ROCM_VERSION }} --depth 1
1103+
curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }}/pool/main/r/rocwmma-dev/rocwmma-dev_1.7.0.60402-120~24.04_amd64.deb"
1104+
7z x rocwmma.deb
1105+
7z x data.tar
11041106
11051107
- name: Cache ROCm Installation
11061108
id: cache-rocm
@@ -1161,8 +1163,9 @@ jobs:
11611163
cmake -G "Unix Makefiles" -B build -S . `
11621164
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
11631165
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1164-
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
1166+
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-${{ env.ROCM_VERSION }}/include/" `
11651167
-DCMAKE_BUILD_TYPE=Release `
1168+
-DROCM_DIR="${env:HIP_PATH}" `
11661169
-DGGML_HIP=ON `
11671170
-DGGML_HIP_ROCWMMA_FATTN=ON `
11681171
-DGGML_RPC=ON `

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,12 @@ jobs:
543543
id: checkout
544544
uses: actions/checkout@v4
545545

546-
- name: Clone rocWMMA repository
547-
id: clone_rocwmma
546+
- name: Grab rocWMMA package
547+
id: grab_rocwmma
548548
run: |
549-
git clone https://github.com/rocm/rocwmma --branch develop --depth 1
549+
curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/7.0.1/pool/main/r/rocwmma-dev/rocwmma-dev_2.0.0.70001-42~24.04_amd64.deb"
550+
7z x rocwmma.deb
551+
7z x data.tar
550552
551553
- name: Cache ROCm Installation
552554
id: cache-rocm
@@ -601,7 +603,7 @@ jobs:
601603
cmake -G "Unix Makefiles" -B build -S . `
602604
-DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
603605
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
604-
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/ -Wno-ignored-attributes -Wno-nested-anon-types" `
606+
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-7.0.1/include/ -Wno-ignored-attributes -Wno-nested-anon-types" `
605607
-DCMAKE_BUILD_TYPE=Release `
606608
-DGGML_BACKEND_DL=ON `
607609
-DGGML_NATIVE=OFF `

0 commit comments

Comments
 (0)