Jiewen Tan
338eb1b2b3
[LTC] Export torch::lazy::GetBackendDevice() ( #70963 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70963
This commit exports torch::lazy::GetBackendDevice().
Test Plan: CI in the lazy_tensor_staging branch.
Reviewed By: wconstab
Differential Revision: D33468938
Pulled By: alanwaketan
fbshipit-source-id: f65599c9238bf6b4f4ffbd5194befdc267272831
2022-01-07 13:13:18 -08:00
Jiewen Tan
ab57f6d12c
[LTC] Upstream utils to extract BackendDevice from at::Tensor ( #70069 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70069
This commit upstreams utils to extract BackendDevice from at::Tensor.
Test Plan: ./build/bin/test_lazy --gtest_filter=BackendDeviceTest.GetBackendDevice*
Reviewed By: samdow
Differential Revision: D33293160
Pulled By: alanwaketan
fbshipit-source-id: 78647239f90b4d04adce84ae6022b8983ad30c09
2021-12-23 12:42:03 -08:00
Michael Suo
795af1578c
Revert D33172665: [LTC] Upstream utils to extract BackendDevice from at::Tensor
...
Test Plan: revert-hammer
Differential Revision:
D33172665 (121d067999 )
Original commit changeset: b334ee358ea7
Original Phabricator Diff: D33172665 (121d067999 )
fbshipit-source-id: 8bff43cddfc5d30483ec5cea8eff037aab9d1cfa
2021-12-22 21:12:49 -08:00
Jiewen Tan
121d067999
[LTC] Upstream utils to extract BackendDevice from at::Tensor ( #70069 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70069
This commit upstreams utils to extract BackendDevice from at::Tensor.
Test Plan: ./build/bin/test_lazy --gtest_filter=BackendDeviceTest.GetBackendDevice*
Reviewed By: wconstab
Differential Revision: D33172665
Pulled By: alanwaketan
fbshipit-source-id: b334ee358ea7b031bbffb0a16fa634715dba83f5
2021-12-22 18:15:45 -08:00
Jiewen Tan
e6c435bf96
[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
2021-12-01 12:15:32 -08:00
Jiewen Tan
6011c35a79
[LTC] Upstream class BackendDevice ( #68027 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68027
This commit upstreams class BackendDevice to the master, which is a backend
specific representation of the actual hardware, for instances, CPU, GPU, or
TPU.
This concept is important for backend like XLA where it needs to tell the
actual hardware type from the c10::DeviceType::Lazy virtual device during
both IR constructions and lowerings.
Test Plan: ./build/bin/test_lazy --gtest_filter=BackendDeviceTest.*
Reviewed By: wconstab
Differential Revision: D32261838
Pulled By: alanwaketan
fbshipit-source-id: 579c3fc5f9da7847c887a383c6047e8ecb9cc5bc
2021-11-10 07:05:43 -08:00