Move BUILD_NAMEDTENSOR in NamedTensorUtils.h (#25781)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25781
To prepare for removing the BUILD_NAMEDTENSOR flag, I am attempting to
remove BUILD_NAMEDTENSOR out of header areas.
Test Plan:
- [namedtensor ci]
- Tested building locally with USE_STATIC_DISPATCH=1. Previously, in
https://github.com/pytorch/pytorch/pull/25721, this change had caused a
dependency cycle while building with that on.
Differential Revision: D17229490
Pulled By: zou3519
fbshipit-source-id: 22fbd5e2770374ab321c13542fa321a2bf7d3101