inline to prevent duplicate obj when linking (#30363)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30363
getting duplicate definition errors when linking test.
ghstack-source-id: 94472892
Test Plan: CI passes
Differential Revision: D18669686
fbshipit-source-id: 3d3bfc38e4247cf8bea655537824b891b84f67bc