-
Notifications
You must be signed in to change notification settings - Fork 429
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
Support qmatmul with different dims tensors #4438
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4438
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 1087859 with merge base 1e4603d (): BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D60314979 |
# Combine the larger batch dimensions with the matmul output size | ||
out_size = ( | ||
X_batch_dims + mat_size | ||
if len(X_batch_dims) > len(Y_batch_dims) | ||
else Y_batch_dims + mat_size | ||
) |
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.
Why combine the larger of the two batch dims? Perhaps it should just default to the first argument's instead?
This would seem like unpredictable behavior to someone using this function.
Summary: Pull Request resolved: #4438 MobileBERT exposes an issue in our kernel, where tensors have compatible (for PyTorch) but different batch dimensions. This diff changes the meta kernel to support that (the kernel can already do it). Reviewed By: dulinriley Differential Revision: D60314979
This pull request was exported from Phabricator. Differential Revision: D60314979 |
5524ec1
to
1087859
Compare
This pull request has been merged in f695f8e. |
Summary:
MobileBERT exposes an issue in our kernel, where tensors have compatible (for PyTorch) but different batch dimensions.
This diff changes the meta kernel to support that (the kernel can already do it).
Differential Revision: D60314979