Skip to content
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

torch.aten.pixel_shuffle #148

Closed
Tracked by #119
newling opened this issue Nov 2, 2023 · 4 comments
Closed
Tracked by #119

torch.aten.pixel_shuffle #148

newling opened this issue Nov 2, 2023 · 4 comments
Assignees

Comments

@newling
Copy link

newling commented Nov 2, 2023

No description provided.

@dan-garvey
Copy link
Member

Have you done a torch-mlir op lowering before? This may be a meaty one to start on...

@newling
Copy link
Author

newling commented Nov 2, 2023

I haven't done one yet. I figured it'd just get decomposed as a reshape, a permute, and then another reshape, unless I've misread the description. I haven't really started on it yet though, so happy to change to something else.

Something like

(N, C, H, W) -> reshape -> (N, C/K^2, K, K, H, W) -> permute -> (N, C/K^2, H, K, W, K) -> reshape -> (N, C/K^2, HK, WK)

@harishanand95
Copy link

harishanand95 commented Nov 2, 2023

https://github.com/pytorch/pytorch/blob/e1cd220b901c7e1bb37bf822c356ba3f8e6b3134/torch/nn/functional.py#L1921 Here is an older pytorch code for pixel_shuffle that works through torch-mlir, if it helps. I had used this as a workaround before.

@newling
Copy link
Author

newling commented Nov 2, 2023

Thanks @harishanand95 ! That's basically the algorithm that @vivekkhandelwal1 and I had in mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants