Const trace error v2 (#18535)
Summary:
Trying to reland https://github.com/pytorch/pytorch/pull/18298
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18535
Differential Revision: D14652391
Pulled By: eellison
fbshipit-source-id: 699e30045dd5f14f0a2b98378272045a292e1e2a