mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[MTIA] Support loading Tensors on mtia:0 for pytorch code (#149327)
Summary: The diff includes updates to the PyTorch code to enable loading tensors to MTIA. Reviewed By: PatriceVignola Differential Revision: D71176848 Pull Request resolved: https://github.com/pytorch/pytorch/pull/149327 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
7bb9c36784
commit
b99fc9d29f
@ -623,7 +623,8 @@ PickleOpCode Unpickler::readInstruction() {
|
||||
}
|
||||
|
||||
if (device.is_cuda() || device.is_xpu() || device.is_meta() ||
|
||||
device.is_hpu() || device.is_mps() || device.is_privateuseone()) {
|
||||
device.is_mtia() || device.is_hpu() || device.is_mps() ||
|
||||
device.is_privateuseone()) {
|
||||
tensor = tensor.to(device, tensor.scalar_type());
|
||||
} else if (device.type() != DeviceType::CPU) {
|
||||
TORCH_CHECK(
|
||||
|
||||
Reference in New Issue
Block a user