Skip to content

xpu: parallelize exact Qwen4 TFQ expert block dots on B70 - #8

Draft
supernovae wants to merge 8 commits into
xpu/review-qwen4-tfq-ultrafrom
bench/b70-tfq-packed-decode
Draft

supernovae wants to merge 8 commits into
xpu/review-qwen4-tfq-ultrafrom
bench/b70-tfq-packed-decode

Conversation

@supernovae

@supernovae supernovae commented Dec 5, 2026 •

Copy link
Copy Markdown
Owner

Grouped expert panels on the current draft

Head 5b4562454eececc2aebe1a174ef5f8918f314a70 adds XMX panel reuse for 5–16 target rows. Up to four slots routed to the same expert reuse each unpacked panel, then the existing finish kernel applies scales and accumulates in the original FP32 order. Incremental diff · Commands and raw receipts

The native build passed 74 steps. The live contract matched gate, up and down bit for bit at every width from 1 through 16. Its planted empty group plan failed at 5 rows. All 33 Ultra greedy replies matched the independent Vulkan fixture and the expected prefix counts across TP1, TP2 and TP4. In the single TP1 before/after comparison, plain resumed throughput was 30.07 → 30.09 tok/s solo and 56.95 → 56.98 tok/s across four requests. zig build test test-golden -j5 passed all 1,109 steps, with 17,882 tests passed and 130 skipped. Formatting and the PR checker passed, with 88 inherited lean findings and zero new.

SUMMARY bmg-g31 0xe223 35 kernels: 35 pass gates 1-4, 0 fail, 0 known findings; 24 controls: 24 red as planted, 0 missed; 0 limit problems; gates 11876 ms, limits 0 ms

On the separate TFQ + DFlash2 integration build, one B70 went from 130.2 → 177.2 tok/s in common four-request overlap and from 121.7 → 164.2 tok/s in aggregate. At 16K, Micro solo went from 97.1 → 119.3 tok/s. At 2K, Ultra solo went from 95.0 → 122.8 tok/s. All greedy tokens matched, and the solo acceptance counts were identical before and after. The receipt identifies the experimental build pair and includes the full ABBA records.

The fork ATC scan completed against b5988064def8 on December 5 at 23:25 UTC with no external PR conflicts. It identified overlaps with local experimental trees. The upstream scan still reports pullRequestsLimit. The five format PRs are in upstream review. The packed-decode submission follows ashhart#6454 under the agreed review order.

Change

Refs ashhart#6472. This fork draft stacks on the official Ultra serving PR at b5988064def8b21e45e81ea5860c69c5d7c31ea0. Original block-dot review head 5e3d4019666028469007f36217a4b815c79d9a7d. The device experiment used source 6e682814154b3e75d5b6bcbcdb97c65a0e1be93f and baseline 819a2dcbdb563c101d4266d178c4945fa00bf2ea. Incremental comparison

Benchmark

At TP4 the two paired resumed solo comparisons were 18.75 → 32.21 tok/s and 18.77 → 32.21 tok/s. The four-request aggregate was 37.35 → 48.21 and 37.67 → 48.55 tok/s. During common four-way decode the two candidates delivered 70.59 and 70.37 tok/s. Every arm matched all 11 independent Ultra Vulkan stream results. The candidate uses the original FP32 FMA order once the independent integer dots are ready.

Four PCIe Arc Pro B70s, Level Zero, the official Ultra 4.50 checkpoint, plain greedy serving and 64-row chunks. The receipt includes hardware, build settings, server and client commands, the individual arm results, output hashes and cache accounting. Hardware receipt

Kernel checks

SUMMARY bmg-g31 0xe223 35 kernels: 35 pass gates 1-4, 0 fail, 0 known findings; 23 controls: 23 red as planted, 0 missed; 0 limit problems; gates 10640 ms, limits 0 ms

The native tests, Zig format, whitespace and PR checks passed on the B70 branch with zero new lean findings. The backend image changes are confined to XPU.

Coordination

The paginated upstream scan covered all 442 open PRs at scan time. ATC reported partial coverage. Trial merges found no additional conflicting source paths in the reviewed upstream overlap candidates relative to Ultra. The optimization is separate from the upstream per-pack support stack. The public issue tracks the upstream acceptance gate.

Extended hardware benchmarks

The standalone packed decode candidate served the repository’s standard TP4 clients at a 4,096-token context. Each code/chat cell requested up to 256 tokens with three repetitions. All 30 independent serial/shared hash comparisons passed.

Workload Solo decode tok/s, baseline → candidate Four aggregate tok/s, baseline → candidate Four steady tok/s, baseline → candidate
code 18.78 → 32.30 57.40 → 79.50 59.70 → 83.90
chat 18.81 → 32.30 58.00 → 80.30 59.80 → 83.90

The same release fixture also passed all 11 streams at each additional rank count.

Cards Resumed solo tok/s Four aggregate tok/s Four steady tok/s
1 30.12 57.05 67.60
2 32.02 57.52 73.83
4 32.21 48.55 70.37

Raw benchmark data and commands

Standard receipt coverage

On the Ultra baseline and the packed-decode candidate, the public logprobs_long chat prompt returned both requested tokens with HTTP 200 in a two-token streaming control. With logprobs=true, top_logprobs=1 both servers returned HTTP 400, “logprobs are not supported by this model or backend.” The full 16,384-output-token logprob workload therefore remains open for the native TFQ lane. The benchmark tables above use the standard greedy clients. The separate FP8 logprob implementation is tracked in #6434.

Landed checkpoint integration

The refreshed Ultra parent includes ashhart#6372 and ashhart#6426. The incremental performance patch preserved all added and removed source lines. On this revision the native build passed 101 steps and 40 focused host tests. A fresh TP4 server passed all 11 independent Ultra streams. The live device contract exited 0.

SUMMARY bmg-g31 0xe223 35 kernels: 35 pass gates 1-4, 0 fail, 0 known findings; 23 controls: 23 red as planted, 0 missed; 0 limit problems; gates 12589 ms, limits 0 ms

Independent upstream PRs ashhart#3671, ashhart#4701, ashhart#5602, ashhart#5950, ashhart#6270 also edit the optimization ledger. Preserve the measured B70 receipt link and the other backend values when those ledger rows meet. The incremental native source had no additional trial-merge conflicts relative to Ultra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant