mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 08:22:07 +00:00
feat(backend): tell cmake to build llama-common and link to it
This commit is contained in:
parent
0911076320
commit
098c66920d
@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD 23)
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
set(LLAMA_CPP_TARGET_VERSION "b3837" CACHE STRING "Version of llama.cpp to build against")
|
set(LLAMA_CPP_TARGET_VERSION "b3837" CACHE STRING "Version of llama.cpp to build against")
|
||||||
|
set(LLAMA_BUILD_COMMON ON)
|
||||||
set(LLAMA_CPP_TARGET_CUDA_ARCHS "75-real;80-real;86-real;89-real;90-real" CACHE STRING "CUDA arch(s) to build")
|
set(LLAMA_CPP_TARGET_CUDA_ARCHS "75-real;80-real;86-real;89-real;90-real" CACHE STRING "CUDA arch(s) to build")
|
||||||
option(LLAMA_CPP_BUILD_OFFLINE_RUNNER "Flag to build the standalone c++ backend runner")
|
option(LLAMA_CPP_BUILD_OFFLINE_RUNNER "Flag to build the standalone c++ backend runner")
|
||||||
option(LLAMA_CPP_BUILD_CUDA "Flag to build CUDA enabled inference through llama.cpp")
|
option(LLAMA_CPP_BUILD_CUDA "Flag to build CUDA enabled inference through llama.cpp")
|
||||||
@ -28,7 +29,7 @@ fetchcontent_declare(
|
|||||||
llama
|
llama
|
||||||
# DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
# DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
||||||
GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git
|
GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git
|
||||||
GIT_TAG b3837
|
GIT_TAG b3958
|
||||||
GIT_SHALLOW FALSE
|
GIT_SHALLOW FALSE
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -41,7 +42,8 @@ target_link_libraries(tgi_llama_cpp_backend_impl PUBLIC fmt::fmt spdlog::spdlog
|
|||||||
if (${LLAMA_CPP_BUILD_OFFLINE_RUNNER})
|
if (${LLAMA_CPP_BUILD_OFFLINE_RUNNER})
|
||||||
message(STATUS "Building llama.cpp offline runner")
|
message(STATUS "Building llama.cpp offline runner")
|
||||||
add_executable(tgi_llama_cpp_offline_runner offline/main.cpp)
|
add_executable(tgi_llama_cpp_offline_runner offline/main.cpp)
|
||||||
target_link_libraries(tgi_llama_cpp_offline_runner tgi_llama_cpp_backend_impl)
|
|
||||||
|
target_link_libraries(tgi_llama_cpp_offline_runner PUBLIC tgi_llama_cpp_backend_impl llama common)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user