Add thread-local-state NamesMode and NoNamesGuard (#24942)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24942
NamesMode determines whether or not to ignore the names field of
TensorImpl. In particular, when it is disabled, all tensors are treated
as unnamed.
Test Plan: - New tests [namedtensor ci]
Differential Revision: D16930708
Pulled By: zou3519
fbshipit-source-id: 867b31c4daff4e1eabafea45ed489efda4471efb