model_dump: Handle torch.device objects (#57656)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57656
This came up when dumping a CUDA model.
Test Plan: Dumped a CUDA model.
Reviewed By: malfet
Differential Revision: D28531396
Pulled By: dreiss
fbshipit-source-id: fe0e94248c8085a8b760d253ba0b517f153b3442