Remove many usages of Type (#21941)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21941
ghimport-source-id: f20cca6229daba9eb8652adb3d959266ae081ef1
Test Plan: Imported from OSS
Differential Revision: D15893331
Pulled By: li-roy
fbshipit-source-id: c988b16008ff0e2725a88c6025afd4aabdaca45a