@@ -29,7 +29,10 @@ endif()
29
29
set (_common_compile_options -Wno-deprecated-declarations -fPIC)
30
30
31
31
# Let files say "include <executorch/path/to/header.h>".
32
- set (_common_include_directories ${EXECUTORCH_ROOT} /..)
32
+ set (_common_include_directories ${EXECUTORCH_ROOT} /..
33
+ ${EXECUTORCH_ROOT} /runtime/core/portable_type/c10
34
+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/include
35
+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/third-party/json/single_include)
33
36
34
37
#
35
38
# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.
@@ -71,9 +74,13 @@ if(${ANDROID})
71
74
72
75
target_link_libraries (
73
76
mtk_executor_runner ${_executor_runner_libs} executorch neuron_backend
77
+ executorch_core
78
+ extension_evalue_util
79
+ extension_runner_util
74
80
gflags
75
81
)
76
82
target_compile_options (mtk_executor_runner PUBLIC ${_common_compile_options} )
83
+ add_compile_definitions (C10_USING_CUSTOM_GENERATED_MACROS)
77
84
78
85
set (_mtk_oss_executor_runner__srcs ${_executor_runner__srcs} )
79
86
list (
@@ -104,6 +111,7 @@ if(${ANDROID})
104
111
105
112
target_link_libraries (mtk_oss_executor_runner
106
113
${_executor_runner_libs}
114
+ extension_module
107
115
executorch
108
116
neuron_backend
109
117
gflags
@@ -142,13 +150,18 @@ if(${ANDROID})
142
150
target_include_directories (
143
151
tokenizer PUBLIC ${_common_include_directories} ${THIRD_PARTY_ABSL_DIR}
144
152
${THIRD_PARTY_RE2_DIR} ${LLAMA2_TOKENIZER_DIR} /include
153
+ ${CMAKE_CURRENT_BINARY_DIR} /tokenizers/third-party/pcre2
154
+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/include
145
155
)
146
156
target_link_libraries (tokenizer PRIVATE re2::re2)
147
157
target_sources (
148
158
tokenizer
149
159
PRIVATE
150
160
${LLAMA2_TOKENIZER_DIR} /src/tiktoken.cpp
151
161
${LLAMA2_TOKENIZER_DIR} /src/llama2c_tokenizer.cpp
162
+ ${LLAMA2_TOKENIZER_DIR} /src/regex .cpp
163
+ ${LLAMA2_TOKENIZER_DIR} /src/bpe_tokenizer_base.cpp
164
+ ${LLAMA2_TOKENIZER_DIR} /src/re2_regex.cpp
152
165
${CMAKE_CURRENT_SOURCE_DIR} /../models/llama/tokenizer/llama_tiktoken.cpp
153
166
)
154
167
0 commit comments