Disallow creation of tensors with duplicate names (#21781)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21781
ghimport-source-id: d77e0c97fe0104b4b29571fd5828967399d34fb1
Test Plan:
- `python test/test_namedtensor.py -v` [namedtensor ci]
gh-metadata: pytorch pytorch 21781 gh/zou3519/51/head
Imported from OSS
Differential Revision: D15833454
Pulled By: zou3519
fbshipit-source-id: fca4de83fba4bced615ec3cbd4ce4c441ddfcaf2