[LTC] Upstream helpers for c10::Device <=> BackendDevice (#69064)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69064
This commit upstreams helpers for converting a c10::Device to
BackendDevice and vice versa.
Test Plan: ./build/bin/test_lazy --gtest_filter=BackendDeviceTest.FromAten:BackendDeviceTest.ToAten
Reviewed By: wconstab
Differential Revision: D32732607
Pulled By: alanwaketan
fbshipit-source-id: 0dd233d37a4a30fc4b22dba322ddd85d4cb3635b