Fix dependency by moving Dimname.{h,cpp} NamedTensor.{h,cpp} to core/ (#25280)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25280
`ATen/core/Tensor.h` and `ATen/core/TensorMethods.h` both depend on
Dimname.h and NamedTensor.h. Therefore `Dimname.h` and `NamedTensor.h`
should really be in `ATen/core`. It's not a problem right now because
this dependency chain (core files cannot depend on non-core files) isn't
enforced in our OSS builds, but it is necessary to resolve this before
removing the BUILD_NAMEDTENSOR flag.
Test Plan
- [namedtensor ci]
Test Plan: Imported from OSS
Differential Revision: D17087195
Pulled By: zou3519
fbshipit-source-id: f06e4268d91fabadb04b41d5b78fb0e530f030fd