SymInt
input doesn't get optimized out from torch.compiled()
graph even if unused
#108446
Labels
good first issue
module: dynamic shapes
oncall: pt2
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Describe the bug
We have Dynamo backend defined similar to IPEX which traces and freezes the model:
I'm running the Llama model from Transformers repo tag tag: v4.30.1 with following script:
one of the graph that
torch.compile()
produces is:Here second argument is
s0 : torch.SymInt
which isn't used later, I think it should be optimized out by DeadCodeElimination, I tried to calleliminate_dead_code
on model, it doesn't do anything. This is troublesome sinceorch.jit.trace
doesn't supportSymInt
inputs.This bug occurs many times in this model, I pasted only one subgraph where is occurs since it is short.
Problem doesn't occur on v2.0.0 tag, but happens on
400c4de53bb7b36066aef381313ed71e4a877e95
Versions
main branch
cc @ezyang @anijain2305 @chauhang @penguinwu @msaroufim @wconstab @bdhirsh
The text was updated successfully, but these errors were encountered: