File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
examples/models/llama/runner Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,18 @@ add_subdirectory(
7777 ${EXECUTORCH_ROOT} /extension/llm/tokenizers/third-party/re2
7878 ${CMAKE_CURRENT_BINARY_DIR} /re2
7979)
80+ add_subdirectory (
81+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/third-party/json
82+ ${CMAKE_CURRENT_BINARY_DIR} /json
83+ )
84+ target_include_directories (llama_runner
85+ PRIVATE ${CMAKE_INSTALL_PREFIX} /include
86+ ${CMAKE_CURRENT_SOURCE_DIR} /../tokenizers/third-party/llama.cpp-unicode
87+ )
8088set (CMAKE_POSITION_INDEPENDENT_CODE ${_pic_flag} )
8189
8290set (llama_runner_deps executorch extension_data_loader extension_module
83- extension_tensor re2::re2
91+ extension_tensor re2::re2 nlohmann_json::nlohmann_json
8492)
8593
8694target_link_libraries (llama_runner PUBLIC ${llama_runner_deps} )
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def define_common_targets():
4949 "//executorch/runtime/core/exec_aten/util:tensor_util" + aten_suffix ,
5050 "//executorch/examples/models/llama/tokenizer:tiktoken" ,
5151 "//pytorch/tokenizers:llama2c_tokenizer" ,
52- "//pytorch/tokenizers:hf_tokenizer" ,
52+ "//pytorch/tokenizers:hf_tokenizer" ,
5353 ] + (_get_operator_lib (aten )) + ([
5454 # Vulkan API currently cannot build on some platforms (e.g. Apple, FBCODE)
5555 # Therefore enable it explicitly for now to avoid failing tests
Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ add_subdirectory(
2828 ${CMAKE_CURRENT_SOURCE_DIR} /../tokenizers/third-party/re2
2929 ${CMAKE_CURRENT_BINARY_DIR} /re2
3030)
31+ # add_subdirectory(
32+ # ${CMAKE_CURRENT_SOURCE_DIR}/../tokenizers/third-party/json
33+ # ${CMAKE_CURRENT_BINARY_DIR}/json
34+ # )
35+ # target_include_directories(extension_llm_tokenizer
36+ # PRIVATE ${CMAKE_INSTALL_PREFIX}/include
37+ # ${CMAKE_CURRENT_SOURCE_DIR}/../tokenizers/third-party/llama.cpp-unicode
38+ # )
39+
3140set (CMAKE_POSITION_INDEPENDENT_CODE ${_pic_flag} )
3241
3342list (TRANSFORM _extension_llm_tokenizer__srcs PREPEND "${EXECUTORCH_ROOT} /" )
@@ -38,7 +47,7 @@ target_include_directories(
3847 ${CMAKE_CURRENT_SOURCE_DIR} /../tokenizers/include
3948)
4049
41- target_link_libraries (extension_llm_tokenizer re2::re2)
50+ # target_link_libraries(extension_llm_tokenizer re2::re2 nlohmann_json::nlohmann_json )
4251target_compile_options (
4352 extension_llm_tokenizer PUBLIC ${_common_compile_options}
4453)
You can’t perform that action at this time.
0 commit comments