-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
internal ramp-up taskTasks that are suitable for new folks w/ high-touch guidance from senior PyTorch folksTasks that are suitable for new folks w/ high-touch guidance from senior PyTorch folksmodule: inductoroncall: pt2triagedThis 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
🐛 Describe the bug
The following two invocations are not equivalent:
x = ExternKernel.require_contiguous(x)
storage, old_layout = as_storage_and_layout(x, want_contiguous=True)
and
x = ExternKernel.realize_input(x)
storage, old_layout = as_storage_and_layout(x, want_contiguous=True)
This is because as_storage_and_layout(x, want_contiguous=True) will not behave well with ReinterpretView.
See:
# making the base of x contiguous or stride_ordered will not necessarily make
# the ReinterpretView either, so don't pass along those arguments
The comment comes from me (oops). this was two years ago and I forget some of the context but I think we were making unnecessary clones.
We should be able to translate what strides the base of x would require for the output ReinterpretView to be contiguous and then fix the layout.
Versions
master
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @aakhundov
Metadata
Metadata
Assignees
Labels
internal ramp-up taskTasks that are suitable for new folks w/ high-touch guidance from senior PyTorch folksTasks that are suitable for new folks w/ high-touch guidance from senior PyTorch folksmodule: inductoroncall: pt2triagedThis 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