Skip to content

Support multimethod in runner#17228

Open
lucylq wants to merge 2 commits intogh/lucylq/131/basefrom
gh/lucylq/131/head
Open

Support multimethod in runner#17228
lucylq wants to merge 2 commits intogh/lucylq/131/basefrom
gh/lucylq/131/head

Conversation

@lucylq
Copy link
Contributor

@lucylq lucylq commented Feb 5, 2026

Stack from ghstack (oldest at bottom):

Specify which method to call in the runner.

Update CLAUDE.md for fbcode/xplat.

Differential Revision: D92225533

Specify which method to call in the runner.

Update CLAUDE.md for fbcode/xplat.

Differential Revision: [D92225533](https://our.internmc.facebook.com/intern/diff/D92225533/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 5, 2026

🔗 Helpful Links

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

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

❌ 3 New Failures, 2 Unrelated Failures

As of commit e21341c with merge base eac0673 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@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 Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

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.

Specify which method to call in the runner.

Update CLAUDE.md for fbcode/xplat.

Differential Revision: [D92225533](https://our.internmc.facebook.com/intern/diff/D92225533/)

[ghstack-poisoned]
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multimethod support to the LLM runner infrastructure, allowing users to specify which method to execute in the model instead of hardcoding "forward". This is part of a larger stack implementing multimethod and LoRA support.

Changes:

  • Added method_name parameter to TextDecoderRunner and related factory functions, with "forward" as the default
  • Updated all runner code to use the configurable method name instead of hardcoded "forward"
  • Added command-line flag --method_name to the llama example
  • Included minor documentation updates to CLAUDE.md about fbcode/xplat conventions

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
extension/llm/runner/text_decoder_runner.h Added method_name constructor parameter, member variable, and getter method
extension/llm/runner/text_decoder_runner.cpp Updated constructor and step() to use configurable method_name; fixed typo in error message
extension/llm/runner/test/test_text_decoder_runner.cpp Added tests for default and custom method names
extension/llm/runner/llm_runner_helper.h Added method_name parameter to create_text_llm_runner function signatures
extension/llm/runner/llm_runner_helper.cpp Propagated method_name through factory functions; added logging for method name
examples/models/llama/runner/runner.h Added method_name parameter to create_llama_runner functions
examples/models/llama/runner/runner.cpp Propagated method_name through create_llama_runner implementations
examples/models/llama/main.cpp Added --method_name command-line flag
CLAUDE.md Added documentation about fbcode/xplat directory structure; minor formatting fixes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant