Back out "Remove `check` from `_prims_common`, replace with `torch._check*` (#102219)", Back out "Forwatd fix for D46427687" (#103128)
Test Plan: revertitparrot
Reviewed By: malfet
Differential Revision: D46506433
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103128
Approved by: https://github.com/malfet