-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CB] Align the speculative decoding sample with other ones (#1007)
Spin off of #907. Merge after head PR --------- Co-authored-by: Ilya Lavrenov <[email protected]>
- Loading branch information
1 parent
2240669
commit b925196
Showing
15 changed files
with
133 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,23 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# start of dependencies | ||
|
||
include(FetchContent) | ||
|
||
if(POLICY CMP0135) | ||
cmake_policy(SET CMP0135 NEW) | ||
endif() | ||
|
||
FetchContent_Declare(cxxopts | ||
URL https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.1.1.tar.gz | ||
URL_HASH SHA256=523175f792eb0ff04f9e653c90746c12655f10cb70f1d5e6d6d9491420298a08) | ||
FetchContent_MakeAvailable(cxxopts) | ||
|
||
if(NOT TARGET nlohmann_json) | ||
FetchContent_Declare(nlohmann_json | ||
URL https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz | ||
URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406) | ||
FetchContent_MakeAvailable(nlohmann_json) | ||
endif() | ||
|
||
find_package(OpenVINO REQUIRED COMPONENTS Runtime) | ||
|
||
# end of dependencies | ||
find_package(OpenVINOGenAI REQUIRED | ||
PATHS | ||
"${CMAKE_BINARY_DIR}" # Reuse the package from the build. | ||
${OpenVINO_DIR} # GenAI may be installed alogside OpenVINO. | ||
NO_CMAKE_FIND_ROOT_PATH | ||
) | ||
|
||
set(TARGET_NAME speculative_decoding_lm) | ||
add_executable(${TARGET_NAME} ${TARGET_NAME}.cpp) | ||
target_link_libraries(${TARGET_NAME} PRIVATE openvino::genai cxxopts::cxxopts) | ||
target_link_libraries(${TARGET_NAME} PRIVATE openvino::genai) | ||
|
||
set_target_properties(${TARGET_NAME} PROPERTIES | ||
COMPILE_PDB_NAME ${TARGET_NAME} | ||
# Ensure out of box LC_RPATH on macOS with SIP | ||
INSTALL_RPATH_USE_LINK_PATH ON) | ||
|
||
set(TARGET_NAME_CB continuous_batching_speculative_decoding) | ||
add_executable(${TARGET_NAME_CB} ${TARGET_NAME_CB}.cpp) | ||
target_link_libraries(${TARGET_NAME_CB} PRIVATE openvino::genai cxxopts::cxxopts) | ||
install(TARGETS ${TARGET_NAME} | ||
RUNTIME DESTINATION samples_bin/ | ||
COMPONENT samples_bin | ||
EXCLUDE_FROM_ALL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.