Skip to content

Add missing runner_lib dep to main_static (#19210)#19210

Merged
rascani merged 1 commit intopytorch:mainfrom
rascani:export-D103028501
May 4, 2026
Merged

Add missing runner_lib dep to main_static (#19210)#19210
rascani merged 1 commit intopytorch:mainfrom
rascani:export-D103028501

Conversation

@rascani
Copy link
Copy Markdown
Contributor

@rascani rascani commented Apr 29, 2026

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

@rascani rascani requested a review from lucylq as a code owner April 29, 2026 20:10
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 29, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19210

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 29, 2026

@rascani has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103028501.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 29, 2026
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@rascani rascani requested a review from kirklandsign April 29, 2026 20:15
@meta-codesync meta-codesync Bot changed the title Add missing runner_lib dep to main_static Add missing runner_lib dep to main_static (#19210) May 4, 2026
rascani added a commit to rascani/executorch that referenced this pull request May 4, 2026
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
@rascani rascani force-pushed the export-D103028501 branch from 743c67e to 1108353 Compare May 4, 2026 21:48
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
@rascani rascani force-pushed the export-D103028501 branch from 1108353 to 2f0837e Compare May 4, 2026 21:50
@rascani rascani merged commit baa11bc into pytorch:main May 4, 2026
167 of 175 checks passed
@kirklandsign
Copy link
Copy Markdown
Contributor

Thank you! I was about to do the same fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants