Skip to content

Commit

Permalink
Merge pull request #2 from rasapala/ct-beam-search
Browse files Browse the repository at this point in the history
Adding lib to bazel
  • Loading branch information
ilya-lavrenov authored Apr 26, 2024
2 parents 3ff4bfc + e5502c3 commit e5de363
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
18 changes: 0 additions & 18 deletions text_generation/causal_lm/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ FetchContent_MakeAvailable(nlohmann_json)

# end of dependencies

set(TARGET_NAME continuous_batching_sample)
add_executable(${TARGET_NAME} continuous_batching/main.cpp continuous_batching/paged_attention.cpp)
target_include_directories(${TARGET_NAME} PRIVATE continuous_batching)
target_compile_definitions(${TARGET_NAME} PRIVATE OPENVINO_TOKENIZERS_PATH=\"$<TARGET_FILE:openvino_tokenizers>\")
find_package(OpenVINO REQUIRED COMPONENTS Runtime)
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD 20)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON)

set(TARGET_NAME benchmark_sample)
add_executable(${TARGET_NAME} continuous_batching/benchmark.cpp continuous_batching/paged_attention.cpp)
target_include_directories(${TARGET_NAME} PRIVATE continuous_batching "${nlohmann_json_SOURCE_DIR}/include")
target_compile_definitions(${TARGET_NAME} PRIVATE OPENVINO_TOKENIZERS_PATH=\"$<TARGET_FILE:openvino_tokenizers>\")
find_package(OpenVINO REQUIRED COMPONENTS Runtime)
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime cxxopts::cxxopts)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD 20)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON)

set(TARGET_NAME greedy_sample)
add_executable(${TARGET_NAME} greedy_causal_lm.cpp)
target_compile_definitions(${TARGET_NAME} PRIVATE OPENVINO_TOKENIZERS_PATH=\"$<TARGET_FILE:openvino_tokenizers>\")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.15)
# start of dependencies

add_subdirectory(../../../../../thirdparty/openvino_tokenizers/ "${CMAKE_CURRENT_BINARY_DIR}/openvino_tokenizers/")
Expand Down Expand Up @@ -32,3 +33,16 @@ target_compile_definitions(${TARGET_NAME} PRIVATE OPENVINO_TOKENIZERS_PATH=\"$<T
set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)

target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime nlohmann_json::nlohmann_json)

#
# Installation
#

include(GNUInstallDirs)

install(TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.hpp")

0 comments on commit e5de363

Please sign in to comment.