-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Make StorageImpl untyped for non-POD types #33950
Copy link
Copy link
Closed
Labels
high priorityinternalsmodule: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: internalsRelated to internal abstractions in c10 and ATenRelated to internal abstractions in c10 and ATentriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
high priorityinternalsmodule: complexRelated to complex number support in PyTorchRelated to complex number support in PyTorchmodule: internalsRelated to internal abstractions in c10 and ATenRelated to internal abstractions in c10 and ATentriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Right now StorageImpl records a dtype. We should remove the dtype and store bytes directly. Non-POD dtypes should still support custom destruction, but that is built on top of an otherwise untyped representation. Representing storage impls in an untyped way means that we can reinterpret cast tensors, e.g., view a float tensor as a complex tensor.
In the user side we still expose ByteStorage/LongStorage; these should either be eliminated from Python, or implemented as wrappers that know dtype.
cc @ezyang @gchanan @zou3519 @anjali411 @dylanbespalko