Add torch._check_is_size (#108685)
Check comments for what it does. The key distinction is that if
you feed it an unbacked SymInt, we will also apply >= 2 assumption
at compile time.
This will get exercised when I reland
https://github.com/pytorch/pytorch/pull/107788
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108685
Approved by: https://github.com/albanD, https://github.com/Skylion007