pytorch
3e5e18d2 - Fix tensor construction from array (#24283)

Commit
6 years ago
Fix tensor construction from array (#24283) Summary: fixes https://github.com/pytorch/xla/issues/929 The original issue complains about no storage because it is trying to construct a xla tensor from tensor_cpu method. https://github.com/pytorch/pytorch/blob/56fb5e03b53f1687fc93e1821e772c09c0ce5ed0/aten/src/ATen/native/TensorFactories.cpp#L731 In general for backend other than CPU, this `at::tensor` should construct a CPU tensor and move the tensor to the right backend. Pull Request resolved: https://github.com/pytorch/pytorch/pull/24283 Differential Revision: D16793872 Pulled By: ailzhang fbshipit-source-id: bdb502a4e1ee4e78d24751917c4cda6f9928b1d2
Author
Ailing Zhang
Parents
Loading