Repository navigation
CPU: llamafile tinyBLAS GEMM for Q8_0 weights on x86 (bit-identical, 1.6x Q8_0 sampling) - #42
Open
danielhanchen wants to merge 1 commit into
Open
danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
…ggml-patches/0017) (cherry picked from commit f627101079f843f63f16e3fa9a873ddb26cb3d04)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This branch has not been deployed
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.
Based on
cpu-speed(#36). One new ggml patch, no source change.Problem
The CPU build compiles out ggml's llamafile tinyBLAS GEMM (no
sgemm.cppobject in the pin's or #36's build logs), so every Q8_0 matmul runs onevec_dotper output element. On a Q8_0 Z-Image DiT that dot product is 84% of the denoise time (per-op profile, Zen 2), and ComfyUI--cpuis 1.69x faster than the pin on Z-Image Q8_0 at 512 px.Fix
ggml-patches/0017builds tinyBLAS on x86 and routes Q8_0 weights through it. Every other type keeps its current path.GGML_CPU_SGEMM_TYPESselects the types (defaultq8_0).Evidence
Colab CPU VMs (Intel Broadwell, 4 cores / 8 threads, 50 GB), #36 vs #36 + this patch, same VM, interleaved, 3 repeats:
Not covered
AVX512, Zen 4/5, hybrid Intel, Windows and ARM CPUs were not timed; only 4-core cloud VMs.