From 3eab600e3fe226ef33eb90f12f7dea4dd4a39e1f Mon Sep 17 00:00:00 2001 From: Richard Palethorpe Date: Thu, 3 Apr 2025 10:20:09 +0100 Subject: [PATCH] fix(build): Speed up llama build by using all CPUs Signed-off-by: Richard Palethorpe --- backend/cpp/llama/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/cpp/llama/Makefile b/backend/cpp/llama/Makefile index 8deea401..e36dc7c2 100644 --- a/backend/cpp/llama/Makefile +++ b/backend/cpp/llama/Makefile @@ -80,8 +80,8 @@ grpc-server: llama.cpp llama.cpp/examples/grpc-server @echo "Building grpc-server with $(BUILD_TYPE) build type and $(CMAKE_ARGS)" ifneq (,$(findstring sycl,$(BUILD_TYPE))) +bash -c "source $(ONEAPI_VARS); \ - cd llama.cpp && mkdir -p build && cd build && cmake .. $(CMAKE_ARGS) && cmake --build . --config Release $(TARGET)" + cd llama.cpp && mkdir -p build && cd build && cmake .. $(CMAKE_ARGS) && cmake --build . --config Release $(TARGET) -j$(nproc)" else - +cd llama.cpp && mkdir -p build && cd build && cmake .. $(CMAKE_ARGS) && cmake --build . --config Release $(TARGET) + +cd llama.cpp && mkdir -p build && cd build && cmake .. $(CMAKE_ARGS) && cmake --build . --config Release $(TARGET) -j$(nproc) endif - cp llama.cpp/build/bin/grpc-server . \ No newline at end of file + cp llama.cpp/build/bin/grpc-server .