Add TORCH_ASSERT_ONLY_METHOD_OPERATORS macro (#68688)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68688
This adds a new macro `TORCH_ASSERT_ONLY_METHOD_OPERATORS` which
allows `Tensor.h` to be included, but not headers which pull in all
other operators. So, a file that defines this macro needs to use the
fine-grained headers to include only the operators being used.
Test Plan: Imported from OSS
Reviewed By: jbschlosser
Differential Revision: D32596267
Pulled By: albanD
fbshipit-source-id: 6fc2ce3d2b0f52ac6d81b3f063193ce26e0d75a3