From 9a03341094a9f46c6b8b27761a245791cb00aa2d Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Thu, 6 Jun 2024 15:53:25 +0100 Subject: [PATCH] main/server: fix targets --- .devops/main-intel.Dockerfile | 2 +- .devops/main-vulkan.Dockerfile | 2 +- .devops/server-intel.Dockerfile | 2 +- .devops/server-vulkan.Dockerfile | 2 +- .github/workflows/bench.yml | 2 +- .github/workflows/server.yml | 4 ++-- examples/main/CMakeLists.txt | 3 +-- examples/server/CMakeLists.txt | 3 +-- examples/server/tests/README.md | 2 +- 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.devops/main-intel.Dockerfile b/.devops/main-intel.Dockerfile index ded692140..c272b5b95 100644 --- a/.devops/main-intel.Dockerfile +++ b/.devops/main-intel.Dockerfile @@ -23,7 +23,7 @@ RUN if [ "${LLAMA_SYCL_F16}" = "ON" ]; then \ export OPT_SYCL_F16="-DLLAMA_SYCL_F16=ON"; \ fi && \ cmake -B build -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ${OPT_SYCL_F16} && \ - cmake --build build --config Release --target main + cmake --build build --config Release --target llama FROM intel/oneapi-basekit:$ONEAPI_VERSION as runtime diff --git a/.devops/main-vulkan.Dockerfile b/.devops/main-vulkan.Dockerfile index 9d8138a49..b1446b034 100644 --- a/.devops/main-vulkan.Dockerfile +++ b/.devops/main-vulkan.Dockerfile @@ -15,7 +15,7 @@ RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key WORKDIR /app COPY . . RUN cmake -B build -DLLAMA_VULKAN=1 && \ - cmake --build build --config Release --target main + cmake --build build --config Release --target llama # Clean up WORKDIR / diff --git a/.devops/server-intel.Dockerfile b/.devops/server-intel.Dockerfile index fc132dfce..a2394ef4b 100644 --- a/.devops/server-intel.Dockerfile +++ b/.devops/server-intel.Dockerfile @@ -23,7 +23,7 @@ RUN if [ "${LLAMA_SYCL_F16}" = "ON" ]; then \ export OPT_SYCL_F16="-DLLAMA_SYCL_F16=ON"; \ fi && \ cmake -B build -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_CURL=ON ${OPT_SYCL_F16} && \ - cmake --build build --config Release --target server + cmake --build build --config Release --target llama-server FROM intel/oneapi-basekit:$ONEAPI_VERSION as runtime diff --git a/.devops/server-vulkan.Dockerfile b/.devops/server-vulkan.Dockerfile index 6cf7fd763..b0fa0b8e6 100644 --- a/.devops/server-vulkan.Dockerfile +++ b/.devops/server-vulkan.Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && \ WORKDIR /app COPY . . RUN cmake -B build -DLLAMA_VULKAN=1 -DLLAMA_CURL=1 && \ - cmake --build build --config Release --target server + cmake --build build --config Release --target llama-server # Clean up WORKDIR / diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index de0d994c8..88ab4844e 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -119,7 +119,7 @@ jobs: -DLLAMA_FATAL_WARNINGS=OFF \ -DLLAMA_ALL_WARNINGS=OFF \ -DCMAKE_BUILD_TYPE=Release; - cmake --build build --config Release -j $(nproc) --target server + cmake --build build --config Release -j $(nproc) --target llama-server - name: Download the dataset id: download_dataset diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 0789efd18..d4daeab0c 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -98,7 +98,7 @@ jobs: -DLLAMA_CURL=ON \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ; - cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target server + cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server - name: Tests id: server_integration_tests @@ -138,7 +138,7 @@ jobs: id: cmake_build run: | cmake -B build -DLLAMA_CURL=ON -DCURL_LIBRARY="$env:RUNNER_TEMP/libcurl/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:RUNNER_TEMP/libcurl/include" - cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} --target server + cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} --target llama-server - name: Python setup id: setup_python diff --git a/examples/main/CMakeLists.txt b/examples/main/CMakeLists.txt index b90c4bb35..852677321 100644 --- a/examples/main/CMakeLists.txt +++ b/examples/main/CMakeLists.txt @@ -1,5 +1,4 @@ -set(TARGET main) -set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama) +set(TARGET llama) add_executable(${TARGET} main.cpp) install(TARGETS ${TARGET} RUNTIME) target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT}) diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 4b7eeaf2e..8365f9510 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -1,4 +1,4 @@ -set(TARGET server) +set(TARGET llama-server) option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON) option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) @@ -34,7 +34,6 @@ foreach(asset ${PUBLIC_ASSETS}) COMMAND "${CMAKE_COMMAND}" "-DINPUT=${input}" "-DOUTPUT=${output}" -P "${PROJECT_SOURCE_DIR}/scripts/xxd.cmake" ) endforeach() -set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama-server) add_executable(${TARGET} ${TARGET_SRCS}) install(TARGETS ${TARGET} RUNTIME) target_compile_definitions(${TARGET} PRIVATE diff --git a/examples/server/tests/README.md b/examples/server/tests/README.md index aca22822c..1581c3862 100644 --- a/examples/server/tests/README.md +++ b/examples/server/tests/README.md @@ -30,7 +30,7 @@ cd ../../.. mkdir build cd build cmake -DLLAMA_CURL=ON ../ -cmake --build . --target server +cmake --build . --target llama-server ``` 2. Start the test: `./tests.sh`