Remove uses of TypeID (#19452)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19452
ghimport-source-id: 816ae7fe1a18d76f064d5796dec44dca6a138a21
Differential Revision: D15009920
Pulled By: li-roy
fbshipit-source-id: 722f05a927528148555561da62839f84dba645c6