Constexpr type ids (#28023)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28023
ghstack-source-id: 91987335
Test Plan: waitforsandcastle
Differential Revision: D17936166
fbshipit-source-id: 68cfa926c721e5fbc96e083eb47e784bf34a9df4