make copy (#26371)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26371
This is just so the PR making the flat hash map preserve order is easier to review
Replaces https://github.com/pytorch/pytorch/pull/25674 bc ghstack was poisoned and i had to resubmit
Test Plan: Imported from OSS
Differential Revision: D17440132
Pulled By: eellison
fbshipit-source-id: 8a4f640d070d85795261cb3a129518c72096e9ef