Deprecation warning in Tensor.storage()
should suggest alternate API
#89224
Labels
module: deprecation
module: python frontend
For issues relating to PyTorch's Python frontend
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Since #85303 deprecated
TypedStorage
, callingTensor.storage()
now raises a warning about the deprecation because it returns aTypedStorage
. The warning should be updated to mention how to get anUntypedStorage
from the tensor. At the moment, this is done withTensor._storage()
, but it should be renamed toTensor.untyped_storage()
so that it's public, and there should be documentation for it.It might be good for the warning to mention in which cases
UntypedStorage
andTypedStorage
are not interchangeable.We should also have a function that takes anEDIT:UntypedStorage
and atorch.dtype
and returns a tensor that wraps the storage.torch.tensor
does thiscc @albanD
The text was updated successfully, but these errors were encountered: