fix(apple): disable BUILD_TYPE metal on fallback (#3199)

When compiling the single-binary on Apple, we enforce BUILD_TYPE=metal,
however, we want still to have the fallback vanilla such as if llama.cpp fails
to load metal (e.g. if Acceleration framework is missing, or MacOS version is too old)
we can still run by offloading to the CPU. The default backend is still using metal as usual.

Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
Ettore Di Giacinto 2024-08-08 06:59:10 +02:00 committed by GitHub
parent 1c708d21de
commit 60117ec057
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -387,7 +387,7 @@ ifeq ($(DETECT_LIBS),true)
scripts/prepare-libs.sh backend-assets/grpc/llama-cpp-avx2
endif
ifeq ($(OS),Darwin)
$(info ${GREEN}I Skip CUDA/hipblas build on MacOS${RESET})
BUILD_TYPE=none $(MAKE) backend-assets/grpc/llama-cpp-fallback
else
$(MAKE) backend-assets/grpc/llama-cpp-cuda
$(MAKE) backend-assets/grpc/llama-cpp-hipblas