Enabled comparison ops with named tensors (#27162)
Summary:
Fixing this [issue](https://github.com/pytorch/pytorch/issues/27077).
Tested via unit tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27162
Differential Revision: D17694187
Pulled By: izdeby
fbshipit-source-id: 939017c91605c89a0e08e0c3f8fe21de93bba95b