From fc777e2de287dc9d76f4f6f546a58760c210cf4f Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 9 May 2026 23:07:39 -0400 Subject: [PATCH] fix: target only gfx906 for HIP compilation gfx940/gfx1010/gfx1030/gfx1100 cause C++ narrowing errors in ollama's mma.cuh with hipcc. Since we only have MI50 (gfx906) cards, compile for gfx906 only. Reduces build time and avoids upstream code bugs. --- ai/ollama/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai/ollama/Dockerfile b/ai/ollama/Dockerfile index f530de2..ca92084 100644 --- a/ai/ollama/Dockerfile +++ b/ai/ollama/Dockerfile @@ -51,7 +51,7 @@ RUN mkdir -p build-cpu && cd build-cpu && \ # Step 2: Build HIP backend with hipcc (legacy mode skips enable_language(HIP)) RUN mkdir -p build-hip && cd build-hip && \ CC=hipcc CXX=hipcc cmake .. \ - -DAMDGPU_TARGETS="gfx906:xnack-;gfx940;gfx1010;gfx1030;gfx1100" \ + -DAMDGPU_TARGETS="gfx906:xnack-" \ -DCMAKE_BUILD_TYPE=Release && \ CC=hipcc CXX=hipcc cmake --build . --target ggml-hip -- -l $(nproc) && \ cmake --install . --component HIP --strip --prefix /build/dist