-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Update conv1d meta kernel to match eager #163584
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163584
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5c8e8dd with merge base 51152ef ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
I actually have a previous PR (https://github.com/pytorch/pytorch/pull/160408/files) that implements a similar approach, which could both resolve #163569 and #159462. No offense intended - this is purely a technical discussion. I believe we should align the conv1d meta kernel with the actual convolution kernel implementation. Specifically, we could utilize convolution kernel implementation: pytorch/aten/src/ATen/native/Convolution.cpp Lines 1488 to 1503 in 8f30a8d
cc @eellison |
| if ndim == 3 and weight.dim() == 3: | ||
| # Unsqueeze to reuse conv2d heuristics. | ||
| return ( | ||
| utils.suggest_memory_format(weight.unsqueeze(-1)) == torch.channels_last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using only the weight memory format isn't enough to determine the correct format. Issue #159462 provides a test case that demonstrates this limitation.
|
@thenumberouscode let's go with your implementation then, thanks for catching this I wasn't aware of your PR |
Stack from ghstack (oldest at bottom):
Fixes #163569
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben