Fix return type of getDeviceMap (#57487)
Summary:
https://github.com/pytorch/pytorch/pull/57294 changed behaviour to
return `c10::Device` rather that `c10::DeviceIndex`, but missed method bind:
https://github.com/pytorch/pytorch/blob/1a6f827ae6c585be19973f071a6a05ad8f46b6a1/torch/csrc/distributed/rpc/init.cpp#L606-L611
that cast return type to map of c10::DeviceIndex rather than
c10::Device
Do not ignore cast error when compiling this code
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57487
Reviewed By: nikithamalgifb
Differential Revision: D28158750
Pulled By: malfet
fbshipit-source-id: d57d869cceca8b7ed06d4d638e2b911da8236ed4