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_copyin the lowering.