Factored out the default mappings
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/27164
Test Plan: Imported from OSS
Differential Revision: D17694475
Pulled By: zafartahirov
fbshipit-source-id: df8df5f7d66062ed35da957064a31344e1d3c961