ggml-cpu: re-add AArch64 NEON assembly for ggml_gemv_q4_0_4x4_q8_0() for non-dotprod#10889
Closed
smpurkis wants to merge 1 commit intoggml-org:masterfrom
Conversation
slaren
reviewed
Dec 18, 2024
Comment on lines
+607
to
+612
| ".inst 0x4fbbe27a // sdot v26.4s, v19.16b, v27.4b[1]\n" | ||
| ".inst 0x4fb9e31a // sdot v26.4s, v24.16b, v25.4b[1]\n" | ||
| ".inst 0x4f9bea5a // sdot v26.4s, v18.16b, v27.4b[2]\n" | ||
| ".inst 0x4f99eafa // sdot v26.4s, v23.16b, v25.4b[2]\n" | ||
| ".inst 0x4fbbea3a // sdot v26.4s, v17.16b, v27.4b[3]\n" | ||
| ".inst 0x4fb9eada // sdot v26.4s, v22.16b, v25.4b[3]\n" |
Member
There was a problem hiding this comment.
Isn't the sdot instruction part of the dotprod feature?
Author
There was a problem hiding this comment.
Forgive me, I don't know assembly or intrisincs that well.
All I can say is that defined(__ARM_FEATURE_DOTPROD) is not allowing this code to be used, adding CMAKE_ARGS="-D__ARM_FEATURE_DOTPROD=1" didn't seem to make a difference. Inference runs fine on Ampere A1 CPU, when defined(__ARM_FEATURE_DOTPROD) is apparently not supported
Member
|
I think it's related to the current build system, can you try this ? |
Author
|
@angt Here are the results for running Looks like you are right. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self-reported review complexity:
This PR improves performance (to before a level before a set of performance regressions, see #10757).
It does two main things:
ggml_gemv_q4_0_4x4_q8_0()andggml_gemm_q4_0_4x4_q8_0()to be used without dotprod, e.g. on Ampere A1 CPU.llama-bench runs to show performance between two commits:
Prompt processing running
Before
After
Generation running
Before
After
Multiple threads
Before
After