From 55ca827267530ca2440b8b3d68445dc5a8e316e7 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 2 Oct 2025 16:53:05 -0700 Subject: [PATCH] AMD: block running on unsupported gfx900/gfx906 (#12481) --- .github/workflows/release.yaml | 1 + Dockerfile | 1 + scripts/build_windows.ps1 | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fc3cde9c..31aed651 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -163,6 +163,7 @@ jobs: cmake --preset "${{ matrix.preset }}" ${{ matrix.flags }} -DOLLAMA_RUNNER_DIR="${{ matrix.runner_dir }}" cmake --build --parallel --preset "${{ matrix.preset }}" cmake --install build --component "${{ startsWith(matrix.preset, 'CUDA ') && 'CUDA' || startsWith(matrix.preset, 'ROCm ') && 'HIP' || 'CPU' }}" --strip --parallel 8 + rm -f dist\lib\ollama\rocm\rocblas\library\*gfx906* env: CMAKE_GENERATOR: Ninja - uses: actions/upload-artifact@v4 diff --git a/Dockerfile b/Dockerfile index e3ab29af..6407f709 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,7 @@ RUN --mount=type=cache,target=/root/.ccache \ cmake --preset 'ROCm 6' -DOLLAMA_RUNNER_DIR="rocm" \ && cmake --build --parallel ${PARALLEL} --preset 'ROCm 6' \ && cmake --install build --component HIP --strip --parallel ${PARALLEL} +RUN rm -f dist/lib/ollama/rocm/rocblas/library/*gfx90[06]* FROM --platform=linux/arm64 nvcr.io/nvidia/l4t-jetpack:${JETPACK5VERSION} AS jetpack-5 ARG CMAKEVERSION diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1 index 4c9d3119..2509f1e5 100644 --- a/scripts/build_windows.ps1 +++ b/scripts/build_windows.ps1 @@ -179,6 +179,7 @@ function buildROCm() { if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} & cmake --install build --component "HIP" --strip if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} + rm -f $script:DIST_DIR\lib\ollama\rocm\rocblas\library\*gfx906* } } }