[Kernel][SM70] Default long-prefill GQA architecture - #286
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>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
|
Audit result: not mergeable in its current form. The proposed architecture changes the reduction order and reports worst relative L2 near 6.9e-3, while quality evidence is limited to one fixed prompt. The 750 MiB persistent-workspace OOM fallback also lacks direct model-path validation. Keeping a default-off 1,673-line vendored kernel patch does not resolve those correctness and maintainability risks. The branch and evidence remain available; resubmit a focused PR after an exact reduction or broader paired quality gate plus direct fallback validation. |
…6-default-20260825-173128 Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
|
最终审计通过:默认路由仅由 SM70 能力和张量运行时契约决定,不含模型/检查点身份门。当前源码干净重放并完成 CUDA 12.8 sm_70 构建;V100 策略测试 112 passed;KV40K/128K 分别为 1.29787x/1.35801x,输出全 finite,max abs 与 relative L2 均通过 1e-3/1e-2 FP16 包络;typed OOM 已验证回落 exact dense。changed-file pre-commit 全过。GitHub 全仓检查失败来自 227 个历史格式化基线文件,与本 PR 7 个文件重叠为 0,判定为非阻断基线噪声。 |
Purpose
Q=8000,KV=40000..128000(step 8000),Hq=6,Hkv=1,D=256, scale1/16long-prefill family.model_type, or architecture-identity gate.VLLM_FLASH_V100_PREFILL_D256_GQA_ARCH_128K_EXPERIMENTAL=0as the legacy rollback setting. CUDA graph capture and unsupported shapes fall through to existing paths; typed workspace OOM falls back to the exact dense route.Test Plan
pytest -q tests/v1/attention/test_sm70_flash_v100_policy.pyon a real V100._vllm_fa2_Cwith CUDA 12.8, Torch cu128, andsm_70.Test Result
git diff --checkpasses.39.29395 ms, candidate30.27579 ms;1.29787xspeedup and 22.95% lower latency.136.07628 ms, candidate100.20284 ms;1.35801xspeedup and 26.36% lower latency.5.4932e-4 / 4.4392e-5, relative L26.6098e-3.2.2888e-4 / 2.5484e-5, relative L26.9166e-3.<=1e-3and relative L2<=1e-2. Bitwise and greedy token identity are not promotion requirements.1.28848x..1.35485xspeedup; all 147,456,000 candidate elements are finite, worst max absolute difference5.0354e-4, worst relative L26.8983e-3.46.10208 s, candidate41.51191 s; prefill latency improves 9.9565% and prompt throughput improves 11.0575%. The identical 32-token smoke is retained only as route-health evidence.Safety
The default route is deliberately narrow and capability-based. Unsupported shapes, layouts, dtypes, scales, devices, paged KV, and CUDA graph capture do not enter it. A missing optional operator falls through. A typed persistent or transient workspace OOM is caught and executes the existing exact fallback instead of failing the request.