[RPC Framework] Expose a Python API for device map getter (#57179)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57179
Expose a Python API to get the device map and unblock RemoteModule work.
See: https://github.com/pytorch/pytorch/pull/56854#issuecomment-827762398
Additionally, add a const decorator for the C++ getter.
#Original PR issue: https://github.com/pytorch/pytorch/issues/51670
ghstack-source-id: 127684266
Test Plan: waitforbuildbot
Reviewed By: mrshenli
Differential Revision: D28070160
fbshipit-source-id: 624d14552d82b99487f72e16428fa75c7a47f61f