pytorch
6140facf - Support SymBool input to torch.compile (#107850)

Commit
1 year ago
Support SymBool input to torch.compile (#107850) We could have SymBool inputs for torch.compile, e.g. in the following situation: ``` def f(x:torch.Tensor): pred = x.size(0) == 3 torch.compile(f)(pred, x) make_fx(f, tracing_mode="symbolic")(x) ``` The idea of this PR (credit to @ezyang) is to support SymBool by re-using the infra we've already had for SymInt so that we don't need to replicate a lot of stuff. Pull Request resolved: https://github.com/pytorch/pytorch/pull/107850 Approved by: https://github.com/ezyang ghstack dependencies: #107662
Author
Committer
Parents
Loading