BE: Use TORCH_CHECK instead of explicit c10::Error (#68187)
Summary:
`if (cond) { raise c10::error("", msg)}` is identical to `TORCH_CHECK(!cond, msg);`, but with better attribution
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68187
Reviewed By: xuzhao9
Differential Revision: D32360956
Pulled By: malfet
fbshipit-source-id: e554b99926d7ad0c79a1cd54d35f47339fa2429d