Repository navigation
Conversation
Port of the HC_POST_GATE fusion to the Metal backend. the new GGML_METAL_FUSION_HC_POST_GATE pattern folds the gate chain into the DSV4_HC_POST kernel: it reads the raw post weights and applies gate_scale_out*sigmoid(gate_scale_in*p), so the chain runs as one kernel instead of four. Assisted-by: pi:llama.cpp/ggml-org/MiMo-V2.6-Flash-MOPD-GGUF (2x Strix Halo (Ethernet, PP=2))
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.
Overview
Port of the HC_POST_GATE fusion to the Metal backend (#30602 on CUDA, #29520 on Vulkan). ggml_metal_fusion_check_hc_post_gate matches SCALE -> SIGMOID -> SCALE -> DSV4_HC_POST feeding hc_post->src[2]; the hc_post kernels apply gate_scale_outsigmoid(scale_inp) to the raw weights, so the chain runs as one kernel instead of four.
Worth ~1.1% TG on M2 Ultra on Qwen3.8-Flash-Next IQ4_NL.
Requirements
pi:llama.cpp2x Strix Halo (Ethernet, PP=2)◷ 2.2h · ↑ 124k · ↓ 85k · ≡ 294 · ⌨ 4