-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix pixel_shuffle return empty #6907
Conversation
Do you know if pixel_shuffle a view op? |
This is how pytorch do the composition: https://github.com/pytorch/pytorch/blob/58047205ed098c04ec045e66fc39dcc70b60600b/torch/_refs/nn/functional/__init__.py#L1183-L1190. XlaOp:Reshape served the functionality of |
I guess my question is, if you do something like
I would expect output to also change since it is a view op. Do we still have that property with this lowering? |
No, it's not. Just tested on both CPU and XLA device, the input and output are in different shapes. |
ok.. yea input and output will be different shape, but if on CPU you modify the source tensor, output tensor won't get modified, it is a not a view op |
Oh I see, I should modify the contents to test the view. Thanks! |
Fixes #5886. Basically lowered the op using the XlaOps instead of going through pytorch decomposition.
Removed
ExpectCounterChanged("xla::permute_copy", cpp_test::GetIgnoredCounters());
because we don't callxla::permute_copy
in the lowering.