mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #584] [CLOSED] CPU lane: IQ1_M one-token rows take ggml-cpu's dot where pdep is fast #608
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#608
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/584
Author: @somnergy
Created: 10/28/2026
Status: ❌ Closed
Base:
main← Head:perf/iq1m-pdep-zen3📝 Commits (1)
414329bCPU lane: IQ1_M one-token rows take ggml-cpu's dot where pdep is fast📊 Changes
5 files changed (+45 additions, -36 deletions)
View changed files
📝
docs/SETTINGS.md(+1 -1)📝
include/strata/kernels/cpu/expert_layout.hpp(+3 -0)📝
src/ds4/ds4_iq_cpu.cpp(+6 -33)📝
src/kernels/cpu/expert_layout.cpp(+31 -0)📝
src/kernels/cpu/native_expert.cpp(+4 -2)📄 Description
The CPU lane's one-token IQ1_M rows (#452) build the grid indices without BMI2
pdep. That suits AMD family 17h (Zen, Zen+, Zen 2) and Hygon, wherepdepruns in microcode. On every other CPU with BMI2, ggml-cpu's own IQ1_M dot builds the indices withpdepand is about 2× faster per core for a single token.With this change, a decode step's IQ1_M experts use ggml-cpu's dot wherever
pdepis fast. The pdep-free rows still serve family 17h/18h, and multi-token rows are unchanged. The existing slow-pdep CPUID probe moves, unchanged, from the DeepSeek IQ1_S rows into the CPU kernel library ascpu_pdep_slow(), so both choices share it.Results
Verdict by CPU class:
MAYA_GLM_CPU_1T=0already chose there.Measured on a Threadripper 7980X (Zen 4), with the engine's own
iq_cpu_gate_up/iq_cpu_downon real IQ1_M / IQ2 experts of a DeepSeek-V4.1-Flash GGUF. Figures are µs per expert, one token each, median of 2 runs over 64 experts.kis the number of experts in the batch; the format pairs are gate-up / down.The unchanged formats move within the harness's run-to-run spread.
Correctness
native_rows_exact_test,native_split_test,ds4_iq1_rows_test(withDS4_IQ1_PDEP=0and=1), andtools/check_hip_compat.py.Settings
Nothing to set.
MAYA_GLM_CPU_1T=0is no longer needed to get the faster IQ1_M path.Multi-token IQ1_M is left alone on purpose: ggml is faster at 2 tokens on one core, but loses at 4 tokens and at 40 threads.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.