Open up AliasAnalysisKind for any ops (#23834)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23834
Re-expot of reverted PR https://github.com/pytorch/pytorch/pull/23810 with the bug fixed
A previous diff removed the special casing for aten:: and prim:: ops in alias analysis and implements alias analysis purely
based on the AliasAnalysisKind. To be sure it doesn't break our existing code base, it added asserts that make sure that
our existing aten:: and prim:: ops set the correct AliasAnalysisKind.
However, we don't need that restriction for future ops. Since we are now certain all existing cases are set up correctly,
we can remove these assertions.
ghstack-source-id: 88050427
Differential Revision: D16657239
fbshipit-source-id: 8a7606da8e9bd961bf47e3e1587b622a9c247ec6