[export] Constraints API (#98433)
Summary:
Wrapper for users to insert constraints into model code.
The constraints will not be maintained in the graph after tracing through make_fx so retracing with dynamo/make_fx will not work. This will be supported after torch._assert supported is implemented. Then we can convert the constrain_range calls to torch._asserts.
cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98433
Differential Revision: D44941579
Pulled By: angelayi
fbshipit-source-id: 606e30153dc54a89b7a1635c69db4eef1d4c5e33