named tensor support for torch.equal (#29322)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29322
torch.equal checks if two tensors are equal in both size and values. For
named tensors, it also checks that the names are exactly equal. There is
an argument to be made for alternative semantics (check that the names
*match*), but for an API that is called "equal" I would expect it to
check equality on names as well.
Test Plan: - new tests
Differential Revision: D18453387
Pulled By: zou3519
fbshipit-source-id: d52bde4e3fdd7f331eef097a3b31d35c89c78049