Fix c10 registration binary size (#26827)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26827
The templates there had a binary size impact of ~20MB. This PR fixes that.
ghstack-source-id: 90842814
Test Plan: build it and see binary size of libtorch.so go down from 95MB to 70MB.
Differential Revision: D17566642
fbshipit-source-id: 57bebffce8e036675a452434bc1a9733f5f2cf6d