-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
ggml-cpu: re-add AArch64 NEON assembly for ggml_gemv_q4_0_4x4_q8_0() for non-dotprod #10889
Conversation
".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" |
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.
Isn't the sdot
instruction part of the dotprod feature?
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.
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
I think it's related to the current build system, can you try this ?
|
@angt Here are the results for running
Looks like you are right. |
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