[Kernel][SM70] Group QSA Page4 prefill - #387
Conversation
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
TP4 endpoint acceptance — passedFinal source/workload contract:
The 8K pure-prefill samples are Quality and route gates:
The focused 8K trace was recovered as both The new first-order hotspots on rank 0 are NVFP4 MoE GEMM ( Final local evidence:
The endpoint/quality gate passes. Keep the PR Draft while the post-Page4 trace |
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Purpose
Follow up #378 with the exact grouped Page4 QSA prefill route for Qwen3.8
Flash-Next on SM70/V100.
are loaded once, while preserving an exact 4-bit mask per query row.
paged cache, groups blocks by active-row category, and validates request,
visibility, logical-page, tail, and physical-page bounds.
--cuda-profile-caseso one case can be captured with Nsight in analready-loaded engine while endpoint gates remain outside the capture range.
migration control document.
Test Plan
Rebuild
flash-attention-v100for SM70.Run the QSA operator/cache and V1 Qwen3.8 cache targeted suites:
Compare the grouped route against the Triton reference using production
Qwen3.8 geometry, including early rows, Page16/Page4 boundaries, a partial
tail, nonmonotonic physical pages, and all-invalid padding.
Run the no-MTP TP4 endpoint gate at 32K/64K/131K and capture only an 8192
profiling case with Nsight Systems and NVML in the same loaded engine.
Test Result
19 passed, 16 warnings in 8.72s.2.434e-4,cosine
1.0; an all-invalid group is bitwise-equal zero.padding, and attention:
16.132 msmedian (15.588 msminimum) versusTriton
55.940 ms, or3.468x; maximum absolute error1.22e-4, relativeL2
3.535e-4, cosine0.99999988.5998.65/5777.43/5450.92tok/s at 32K/64K/131K, improving the retained
4532.07/4446.64/4108.16baseline by32.36%/29.93%/32.69%. An exact 8Kcase is
6394.74 tok/s. Arithmetic, Chinese, and every performance-casetoken hash are bitwise identical to the baseline. The long endpoint sweep
overlapped host/disk activity from an unrelated GPU4-7 model load, so these
are conservative values.
9.632 msper QSA layer/rank plus0.362 msplanning, versus the old55.151 mspath (5.518x,81.88%lower). Per-GPU kernel duty is98.27-98.61%; the post-QSA first hotspot is now the routed NVFP4 MoE chain,not launch gaps or QSA.
Essential Elements of an Effective PR Description Checklist