Skip to content

Commit baa11bc

Browse files
authored
Add missing runner_lib dep to main_static (#19210) (#19210)
Summary: D82497138 added new transitive includes (`constants.h`, `multimodal_prefiller.h`, `extension/tensor/tensor.h`) into `executorch/extension/llm/runner/util.h`. The llava `main.cpp` already includes `multimodal_runner.h`, `multimodal_input.h`, and `image.h`, and calls `create_multimodal_runner` and `load_tokenizer` from `llm_runner_helper`, but the `main` (and auto-generated `main_static`) target only declared `print_evalue` and `threadpool` deps. After D82497138 the compile fails with `Action failed: ... (cxx_compile main.cpp) Remote command returned non-zero exit code 1` because the `runner_lib` headers cannot be found. Add `//executorch/extension/llm/runner:runner_lib` (which transitively re-exports `multimodal_runner_lib` and provides `llm_runner_helper`) to the deps of the `main` cxx_binary so the static variant resolves all required headers and symbols. Also wire the existing `seq_len` flag into `GenerationConfig::seq_len` (it was previously read from gflags but never used, which trips `-Werror=unused-variable` once the headers compile). Reviewed By: psiddh Differential Revision: D103028501
1 parent 2050b8a commit baa11bc

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

examples/models/llava/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ int32_t main(int32_t argc, char** argv) {
166166

167167
::executorch::extension::llm::GenerationConfig config;
168168
config.temperature = temperature;
169+
config.seq_len = seq_len;
169170
config.echo = true;
170171

171172
// Generate

examples/models/llava/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def define_common_targets():
99
compiler_flags = ["-Wno-global-constructors"],
1010
deps = [
1111
"//executorch/extension/evalue_util:print_evalue",
12+
"//executorch/extension/llm/runner:runner_lib",
1213
"//executorch/extension/threadpool:cpuinfo_utils",
1314
"//executorch/extension/threadpool:threadpool",
1415
],

0 commit comments

Comments
 (0)