functionalization: update is_aliased() logic (#68881)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68881
Test Plan: Imported from OSS
Reviewed By: zou3519
Differential Revision: D32647614
Pulled By: bdhirsh
fbshipit-source-id: 6bec50d3e54419d1707d0b6c0c6729bcc1ced1f0