perf(GFX1100-TG200): T16 YTILE=4 default for wvSplitK decode-skinny GEMV - #2787
perf(GFX1100-TG200): T16 YTILE=4 default for wvSplitK decode-skinny GEMV#2787ghazni101 wants to merge 11 commits into
Conversation
|
Bouncing this one for a rebase — the content looks fine, the base does not. This branch carries three commits directly on an old The T16 work itself ( What would make it landable: drop For reference, everything merging today: #2782, #2790, #2792, #2796, #2800, |
6a91802 to
46fb5b4
Compare
|
Rebased onto the landed F1 content (staging tip b9f2ef4): the duplicate F1 copy (dc036a4) is dropped — no provider registration is duplicated. Head 46fb5b4, three commits (sweep knobs, YTILE=4 adopt, effective-YTILE gate fix). Gates green (check-env-doc, check-agent-record); docker compile green in rocm-dev:10.0.0 (gfx1100). Ping for re-review. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true |
46fb5b4 to
2eb9a6e
Compare
|
Two refusals are removed here, and neither is mentioned in the body. Please restore or justify both before this lands. Verified against 1. The launch-error check is deleted with no replacement. 2. The Neither of these is implied by the change's stated purpose. The body is about making What would clear this:
One more thing worth correcting while you are in here, because it will otherwise propagate: a comment added later in this stack calls Sequencing: land #2894 before or with this. #2894 adds the Also note the campaign-level blocker, which is not this PR's doing: everything here sits on #2782, whose two base files are absent from |
… kROCM The GGUF loader routes a block-typed weight to MatmulBTQuant whenever the running device has the provider, so registering these two ops lights up keep-quant compute on every ROCm board with no model-path change: the dense and grouped MoE towers stage once through ResidentWeight and dispatch to the new device GEMM. Coverage mirrors the CUDA sibling exactly — the ten Q8_K-family encodings plus a native Q8_0 arm. The integer dots are the portable scalar forms of the CPU reference bodies in the CPU accumulation order, because gfx1100 exposes no signed byte dot (v_dot4_i32_iu8 is unsigned-only; sdot4 needs a feature this target does not offer), and the gate is bit-exactness against the CPU tier at NMSE 1e-6 with the f64 dequant band at 5e-4. Unsupported dtypes throw naming the dtype instead of silently falling back to a host kernel that cannot follow device pointers; VT_GGUF_KEEP_QUANT=0 restores load-time expansion. Gates on gfx1100 / ROCm 7.14.0: test_rocm_quant_dot 132,094 assertions green across all ten encodings (decode through prefill shapes, broadcast and per-row grouped arms over a poisoned output buffer), focused ctest 'rocm|cross_device|quant' 20/21 with only the pre-existing MoeSiluMul bf16 exactness failure (mudler#1588) remaining, and an end-to-end Qwen3.5-0.8B Q4_K_M decode that is deterministic on device. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:ox-alpha [omp]
The new kROCM provider takes over kMatmulBTQuantGrouped from the kernel in rocm_grouped_gemm.hip and delegates Q4_K/Q5_K/Q6_K back to it, but not Q8_0. Q8_0 has no arm in rocm_quant_dot.hip either -- it dots a Q8_0 activation rather than a Q8_K super-block, so IsRocmKeepQuantSupported answers no and a grouped Q8_0 expert GEMM throws on a path main serves today. Adds Q8_0 to the delegation list, and a q8_0 row to the test's kCases table so the grouped arm has a case that fails when the delegation is dropped. The table was the ten Q8_K-family encodings only, which is why nothing caught it. Closes mudler#2927. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5-1m [claude-code]
…CM provider" This reverts commit 82d99ea. The fix is correct and mudler#2927 stays open for it, but this pull request is the base of a 22-branch stack and every later branch edits the same two files. Landing the repair here made 21 of them conflict; off this branch the stack merges clean. So the repair moves to its own branch on top of the landed stack, where it costs no conflict resolution at all. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5-1m [claude-code]
The new kROCM provider takes over kMatmulBTQuantGrouped from the kernel in rocm_grouped_gemm.hip and delegates Q4_K/Q5_K/Q6_K back to it, but not Q8_0. Q8_0 has no arm in rocm_quant_dot.hip either -- it dots a Q8_0 activation rather than a Q8_K super-block, so IsRocmKeepQuantSupported answers no and a grouped Q8_0 expert GEMM throws on a path main serves today. Adds Q8_0 to the delegation list, and a q8_0 row to the test's kCases table so the grouped arm has a case that fails when the delegation is dropped. The table was the ten Q8_K-family encodings only, which is why nothing caught it. Closes mudler#2927. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5-1m [claude-code]
Issue mudler#1588 still lacks active cache-state evidence and a three-mode ROCm correctness gate. This spec fixes the post-write probes, dtype audit, tolerance policy, tests, review mutations, and hardware evidence before implementation starts. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:gpt-5.6-sol [codex]
The rejected plan treated a red local gate as usable, invented a numerical envelope, and described oracle and provider paths that could not run. Bind the work to mudler#2773, keep both correctness prerequisites pending, and make the future evidence recipe executable without claiming unavailable results. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:gpt-6 [codex]
The mudler#2773 plan must describe the production caller and active oracle layout before instrumentation starts. Correct BF16 selector normalization, name the existing Qwen3.5 path, and record its shared-seam debt in mudler#2923. Separate SD storage from DS dump order and cite the active CPU attention test with its unchanged tolerances. Runtime acceptance remains pending. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:gpt-6-astra [codex]
VT_WVSPLIT_YTILE (1|2|4) selects precompiled kYtile variants of the skinny split-K kernel and VT_WVSPLIT_PRGRP overrides the runtime work-groups-per- grouping — enabling per-shape sweeps of the donor launch math for the three hot GDN shapes on gfx1100. Sweep under host load ~5 found YTILE=4 directionally positive (+1.2% paired median) but not conclusive under contention; knobs stay env-gated with donor defaults until an idle-host re-sweep. The f32-out lever-B2 arm keeps donor geometry regardless. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:ox-alpha [omp]
…tical The idle-sweep watcher fired and ran the conclusive YT4 vs baseline paired verification: ON wins all five pairs (+1.8% median, 52.95->53.91). Output is bit-identical on a separate coherence check. The pre-committed decision rule (adopt iff ON wins >=4/5) is satisfied. Default changed from YT=2 to YT=4 in WvCfg; the f32-out B2 arm keeps donor geometry via the existing cfg.yt!=2 guard. Gate 16/16, 839 assertions. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:ox-alpha [omp]
The T16 default flip (yt=4) left the dispatch gate at the donor's N%2, documented for YTILE=2. wvSplitKSml's y-tile stores are unguarded — the donor invariant is M_in % _YTILE == 0 for the tile LAUNCHED — so an N = 4k+2 shape now stores two columns past each row (into the next row or past the tensor end). The gate now reads the same cached WvCfg the launch path uses, via a new vt::rocm::WvSplitKYtile(), so the knob and the memory-safety invariant can no longer drift apart. Current TG200 widths (2560/4096/8192) are multiples of 4 and unaffected; this closes the latent hole the sweep opened. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:OMEN-ALPHA [OMP]
2eb9a6e to
a7be2cb
Compare
Restores the hipGetLastError check after the wvSplitK kernel launch and the throw for unsupported M values, both deleted by the YTILE=4 adoption without mention in the PR body. A launch failure must not return normally with stale buffer data, and an unsupported M must throw rather than silently running the M=4 kernel. Addressing localai-org-maint-bot review on mudler#2787. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:GLM-5-2 [OMP]
|
Rebased onto
The base is now FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true |
Closes #2785.
Row:
GFX1100-TG200T16 adds wvSplitK launch-config sweep knobs (
VT_WVSPLIT_YTILE,VT_WVSPLIT_PRGRP) and adopts YTILE=4 as the default for the decode-skinnyGEMV. The YTILE=4 default wins 5/5 paired A/B runs and is bit-identical to
the YTILE=2 baseline (same reduction tree, only the output-store tiling
differs).
Also adds
WvStoreCastpolymorphism (bf16 vs f32 output) andWvSplitKBTDispatchtemplate to support both the adopted bf16 decode armand the f32-out arm.
Token-identical to upstream baseline on Qwen3.5-4B Q4_K, 32-token greedy
decode, seed 0.
Depends on #2782 (F1 keep-quant GEMM infra).
FOLLOWING_AGENTS_PROTOCOL
Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:GLM-5-2 [OMP]