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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user