-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Open
Labels
module: __torch_dispatch__module: meta tensorstriagedThis 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
Description
When writing a wrapper tensor you typically want the wrapper to "look like" the wrapped tensor as much as possible. Some things are obvious and directly accepted like _make_wrapper_subclass such as size, dtype, device, layout, requires grad. But there are some things that are not so obvious:
- What storage() returns
- Whether or not the tensor reports as a view()
- What the strides are
- What the storage offset is
It's not so easy to get these to report correctly, since you have to create a whole "phantom" universe of storages at your wrapper level to make everything look right. @bdhirsh had to do some of this in his functionalization pass. Need to make it easier for people in general to do.
cc @albanD
Metadata
Metadata
Assignees
Labels
module: __torch_dispatch__module: meta tensorstriagedThis 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