Clarify placeholder IR that delegates need to support in ExecuTorch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
📚 The doc issue
We do not specify the IR for placeholders/graph inputs that delegates need to support.
For example, today I think placeholders will usually be tensors, with floats and ints inputs being lifted to rank0 tensors. But raw symints also show up as placeholders in the presence of graph breaks. For example,
Lowered module 0:
def forward(...):
sym_size: "Sym(s53)" = torch.ops.aten.sym_size.int(attention_mask, 1); attention_mask = None
return [sym_size, aten_expand_copy_default, aten_add_tensor_1]
Lowered module 1:
def forward(aten_embedding_default_2: "f32[1, s53, 768]", sym_size: "Sym(s53)"):
aten_view_copy_default_3: "f32[1, s53, 768]" = executorch_exir_dialects_edge__ops_aten_view_copy_default(aten_permute_copy_default_3, [1, sym_size, 768]);
We should clarify placeholder IR that delegates are expected to support.
Suggest a potential alternative/fix
No response
cc @JacobSzwejbka @angelayi
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the placeholder and lowered-module examples in this issue, then trace where ExecuTorch documents delegate input requirements. Document which placeholder forms delegates must support, including tensor inputs and raw SymInts, with examples that make the expected IR unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pytorch
- Domain
- compilers, documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100