[ExecuTorch] Placeholder Assertion Error
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 850
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 10
Description
This toy model fails to export in ExecuTorch
```
model = ModuleWrapper(
function=nn.functional.scaled_dot_product_attention,
kwargs={
"attn_mask": None,
"is_causal": True,
},
)
```
due to
```
def assert_functional_graph(fx_g: torch.fx.Graph) -> int:
placeholders = set()
copy_count = 0
# NB: It would also be nice to verify that the mutations all happen at the
# end, but we also do some administrative views after mutations so this
# isn't actually true. (TODO: Could this cause problems for Inductor?)
for n in fx_g.nodes:
if n.op == "placeholder":
placeholders.add(n)
if isinstance(n.target, torch._ops.OpOverload):
if n.target is torch.ops.aten.copy_.default:
suffix = True
# Can only copy_ into an input, and can only do so once
> assert n.args[0] in placeholders
E AssertionError
```
Contributor guide
Assessment
This issue has not been assessed yet.