refactor: split ai/ into hermes/ and ollama/ directories with gfx906 build #19

Merged
gortium merged 21 commits from feat/ollama-gfx906 into master 2026-05-11 01:26:12 +00:00
5 changed files with 106 additions and 2 deletions
Showing only changes of commit 208bfd4612 - Show all commits

View File

@@ -42,12 +42,13 @@ ENV CMAKE_GENERATOR=Ninja
ENV LDFLAGS=-s
# Step 1: Build CPU backends with GCC (no ROCm preset)
# Remove /opt/rocm from PATH to prevent check_language(HIP) from
# finding a HIP compiler, which would trigger the HIP block that
# requires find_package(hip) with proper CMAKE_PREFIX_PATH.
# Pre-set CMAKE_HIP_COMPILER="" to prevent check_language(HIP) from
# finding a HIP compiler (it searches /opt/rocm even without PATH).
# Remove /opt/rocm from PATH to prevent find_program from finding hipcc.
RUN mkdir -p build-cpu && cd build-cpu && \
PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_HIP_COMPILER="" && \
cmake --build . --target ggml-cpu -- -l $(nproc) && \
cmake --install . --component CPU --strip --prefix /build/dist