pytorch / pytorch/executorch

Consolidation of Selective Build APIs for OSS

Open
#11,921 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🚀 The feature, motivation and pitch

Currently, there are three ways a user can enable the selective build process:

  1. Disable selective build and include all operators.
  2. Specify a string list of operators.
  3. Provide a YAML file to enumerate which operators and dtypes should be included.
  4. Provide a exported model (pte) to tailor the executorch build to the operators and tensor dtypes used in the model.

Right now, these APIs are treated as mutually exclusive, but there are use cases where a mixture of methods would be desirable. It would be ideal if there was a clearer/default way to enable selective builds without exposing too much of the configuration burden onto a user.

Example Use Case

A user wants to run two different models, where the second model only contains one differing operator. The user could determine the complete union of operators used by the two models, and manually specify them using the list API, but it would be easier if they could simply pass in one of the models and augment the selected operator set with the single differing operator (i.e. use the model API in conjunction with the list API).

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with codegen/tools/gen_oplist.py, especially the current mutually exclusive input handling around lines 222-228. Review how the operator-list, YAML, and exported-model inputs are represented, then define acceptance cases for combining them and verify that selective builds include the union of the requested operators and dtypes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.