ggml: x64: implement AMX dot product#7487
Closed
ReinForce-II wants to merge 4 commits intoggml-org:masterfrom
Closed
ggml: x64: implement AMX dot product#7487ReinForce-II wants to merge 4 commits intoggml-org:masterfrom
ReinForce-II wants to merge 4 commits intoggml-org:masterfrom
Conversation
Contributor
|
@ReinForce-II any news on this? |
Member
|
I think this work is superseded by the recent #8998 |
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.




This PR introduces support for AMX(Advanced Matrix Extensions) kernel for the vector dot on the x64 architecture.
AMX is enabled if LLAMA_AMX=ON or LLAMA_NATIVE=ON is set in cmake on corresponding platforms.
It performs 16x16x16 of 4-byte packed dot product in bf16 instead of quantized vector dot.
Here are the performance measured on w9-3475x capped to 2.2ghz fixed frequency.
Q4_0
PR
./llama-bench -m ./Llama-2-7b-chat-q40.gguf -pg 0,0 -t 4,8,16build: ba1987f2 (2975)
master
./llama-bench -m ./Llama-2-7b-chat-q40.gguf -pg 0,0 -t 4,8,16build: cd93a28 (2972)
IQ4_XS
PR
./llama-bench -m ./Llama-2-7b-chat-iq4xs.gguf -pg 0,0 -t 4,8,16build: ba1987f2 (2975)
master
./llama-bench -m ./Llama-2-7b-chat-iq4xs.gguf -pg 0,0 -t 4,8,16build: cd93a28 (2972)