pytorch
452af0bc - Call lift fresh in valueToTensor (#81927)

Commit
2 years ago
Call lift fresh in valueToTensor (#81927) `valueToTensor` is invoked in many python apis such as `x[0] = 0.5`, which lifts the 0.5 to a tensor. the problem is described similarly in https://github.com/pytorch/pytorch/pull/81609 (/s/scalar_to_tensor/valueToTensor) > scalar_to_tensor is not dispatched and thus there is no interposition point for modes to ensure that the resulting tensor is appropriately wrapped. lift_fresh introduces this interposition point. This prevents FakeTensorMode from erroring Pull Request resolved: https://github.com/pytorch/pytorch/pull/81927 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading