Repository navigation
Conversation
|
Queued in train #421 ( 🤖 Generated with Claude Code |
258d9a5 to
fbb7f4f
Compare
b98d65c to
75e3941
Compare
…logue bound #412 and #413 were re-pushed with one change: w4a16_wmma's prologue loads a K group's first weight tile only when the slice has one (a short last slice read one tile past the pretiled buffer; HSA memory fault on a 16-row Spark prefill chunk, DevLab 45568957561 / 45587106711). The earlier heads are already merged above; this brings in the fixed ones. # Conflicts: # kernels/strix-hip/inkling-2-mini/nvfp4/inkling2_w4a16_wmma.cu
|
The re-pushed head (with the guarded 🤖 Generated with Claude Code |
Prefill: 1,362 -> 1,525 tok/s @7.7K and 1,109 -> 1,383 @31k on framework (hipcc 7.13); runner (hipcc 7.16) 1,192/954 -> 1,327/1,174 (+11%/+23%) after staging V as fp16 in LDS, which drops 7.16 VGPR spill slots 128 -> 16 (fused softmax row staging; no tm/pv temporaries). pd_check 96/96 aligned x6 prompts, mean|dlp| 0.0046-0.0188 (f373 noise); NLL code 0.63684 (-0.00005), text 0.89670 (+0.00052, accepted: flash accumulation order + fp16 P on AMD; pd within noise). task_probe math 30/30 + tools 10/10 spark and strict; agentic 10/10. gb10 inkling-2-mini PTX byte-identical to main. ST-995 (bfcl-subset n=995): 77.99/78.19 vs main's 79.10/79.63. Per-sample rescore vs #412-only responses: 57 verdict flips, 34 lost / 23 gained (-1.11 net); two-sided sign test p ~= 0.19, indistinguishable from accumulation-order noise at temp 0. Deterministic across reruns (bit-identical rerun).
75e3941 to
de09da3
Compare
|
Its content at 75e3941 merged to main in train #421 (791b347). On the DevLab runners' hipcc 7.16 that kernel spills registers: 256 VGPRs and 117 spill slots, against 234 and 0 on hipcc 7.13. That makes runner prefill 8–12% slower than before. The fix (fused softmax staging and fp16 V staged in the kernel) follows in a new PR on current main. |
inkling2 on AMD: flash prefill attention on wave32 WMMA
Ports the Ciru B2-style flash prefill body (Apache-2.0, attributed) to
gfx1151 wave32 WMMA for the inkling-2-mini strix-hip target: K/V staged in
LDS, Q in registers, register online softmax over the (row=2e+lane_hi,
col=lane_lo) fragment layout, fp16 P staged per warp for the PV MMA.
Semantics kept bit-for-bit with inkling2_prefill_attn: bf16-rounded
rel-bias in inkling2_rel_bias_table's accumulation order, per-token sinks,
1024-token SWA on the sliding layers vs full attention on the 4 full
layers, 4096-token prefill chunks reading the paged KV of earlier chunks.
rows >= 64 takes this kernel on cfg!(atlas_scale); the PTX body and all
non-AMD routing are untouched.
Fixes folded in from the first gate:
original (__bf16)((unsigned short*)&lo)[i] was a numeric ushort->bf16
conversion (0x3F40 -> 16256.0) that made every score ~1e4 garbage.
pattern): hipcc's __syncwarp is a bare wave barrier with no LDS
ordering.
Standalone hipcc check vs a CPU reference on gfx1151: q_len 1..4096,
windows 0/16/64/1024/full, chunked prefill q_offset 500..3000 over paged
KV -> max|d| <= 0.004.
Framework gate (vs PR-1 parent binary, official checkpoint + Spark
overlay): prefill_h2h 7,773 tok 5.71s -> 5.10s (1,362 -> 1,525 tok/s),
30,993 tok 27.94s -> 22.41s (1,109 -> 1,383 tok/s); task_probe math 30/30
and tools 10/10 on all four arms; pd_check 96/96 aligned x6, mean|dlp|
0.0046-0.0188 (inside the f373 noise); NLL code 0.63684 (ref 0.63689),
text 0.89670 (ref 0.89618) - inside tolerance given the flash
accumulation order and fp16 P; greedy C1 spark 8/8 identical, strict 6/8
(concurrent-batch scheduling jitter class, same as the PR-1 gate);
0 ERROR/panic on every arm.
gb10 byte-identity: nvcc -ptx (sm_121a) of kernels/gb10/inkling-2-mini/
nvfp4/inkling2_flash_prefill.cu at this commit vs main 7a717b6 produces
identical PTX - the AMD body is fully inside #if SCALE /
HIP_PLATFORM_AMD and the PTX body under #else is untouched.
Stacked on the batched-NVFP4 PR (base = its branch). DevLab strix-hip build 45343130375: success.
Generated with Devin