pytorch
b1f5644f - [frontend] Print real type for Argument (#85103)

Commit
3 years ago
[frontend] Print real type for Argument (#85103) Retry of [#84985](https://github.com/pytorch/pytorch/pull/84985). For some reason `ghstack land` doesn't work on that PR In JIT world, if we parse an argument in schema and print its type, we always get `fake_type`. For example, `MemoryFormat? memory_format` becomes `int? memory_format`. This doesn't align with the original schema string and creates discrepency between `torchgen.FunctionSchema` and `torch._C.FunctionSchema`. Here I'm letting `torch._C.Argument` print its `real_type` and hence be aligned with the original schema string. Rely on newly added unit test. Differential Revision: [D39550665](https://our.internmc.facebook.com/intern/diff/D39550665) Pull Request resolved: https://github.com/pytorch/pytorch/pull/85103 Approved by: https://github.com/cccclai
Author
Committer
Parents
Loading