From b7b3164736b6674ff9e9bbe1db118ed1a953376c Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 23 Jul 2025 21:21:23 +0200 Subject: [PATCH] chore: try to speedup build Signed-off-by: Ettore Di Giacinto --- .gitignore | 1 + backend/cpp/llama-cpp/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f6d83447e..9a93527a4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ prepare-sources /backends /backend-images /result.yaml +protoc *.log diff --git a/backend/cpp/llama-cpp/Makefile b/backend/cpp/llama-cpp/Makefile index 6adb4e6ed..aee6e6c7e 100644 --- a/backend/cpp/llama-cpp/Makefile +++ b/backend/cpp/llama-cpp/Makefile @@ -7,6 +7,7 @@ BUILD_TYPE?= NATIVE?=false ONEAPI_VARS?=/opt/intel/oneapi/setvars.sh TARGET?=--target grpc-server +JOBS?=$(shell nproc) # Disable Shared libs as we are linking on static gRPC and we can't mix shared and static CMAKE_ARGS+=-DBUILD_SHARED_LIBS=OFF -DLLAMA_CURL=OFF @@ -160,8 +161,8 @@ grpc-server: llama.cpp llama.cpp/tools/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 -j $(JOBS) $(TARGET)" 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 -j $(JOBS) $(TARGET) endif cp llama.cpp/build/bin/grpc-server .