-
Notifications
You must be signed in to change notification settings - Fork 830
Metal backend: fix bugs in qmv_impl #17188
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
|
Stack from ghstack (oldest at bottom): |
This PR needs a
|
Fixes two bugs in
qmv_impl(also submitted PR 3096 to MLX)Fix 1: Changed
qdottoqdot_safewhen handling remaining elements in theN < 8caseNotice that in
qmv_impl, there are two code paths based on whetherN < 8:N >= 8: Correctly usesqdot_safefor remaining elementsN < 8: Incorrectly usedqdotinstead ofqdot_safefor remaining elements (fixed in this PR)Fix 2: Changed
in_vec_size_gfrom floor division to ceiling division to correctly handle cases whereKis not a multiple of group size