Skip to content

Fix Q4_K and Q5_K for QK_K = 64 on CUDA #2359

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

Merged
merged 2 commits into from
Jul 25, 2023
Merged

Conversation

ikawrakow
Copy link
Contributor

They were broken (don't even compile) when LLAMA_CUDA_FORCE_DMMV=OFF. As per @JohannesGaessler, when added the matrix times vector versions that use integer SIMD intrinsics, he did not implement for QK_K = 64 as he considered QK_K = 64 to be a temporary fix. I agree with this sentiment, but in the meantime it is not good to have broken stuff on master, so this PR fixes that.

A fix was needed only for Q4_K and Q5_K. Q2_K, Q3_K, and Q6_K worked out of the box.

Performance is not great, but I did not want to spend the time optimizing a temporary solution.

Copy link
Collaborator

@JohannesGaessler JohannesGaessler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test the implementation it but based on just reading it it seems okay.

@ikawrakow ikawrakow merged commit 129d844 into master Jul 25, 2023
@ikawrakow ikawrakow deleted the ik/cuda_fix_QKK_64_2 branch July 25, 2023 10:48
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

Successfully merging this pull request may close these issues.

3 participants