refactor strongTypePtr (#33590)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33590
ghstack-source-id: 98713798
Test Plan: unit test
Differential Revision: D20015521
fbshipit-source-id: 8c744a6f30f12671bef89c3555110ce26609d9a3