[Kernel][SM70] Integrate FP32 v37 prefill and exact E4M3 bridge - #548
Conversation
Retain the qualified prefix/tail arithmetic under a unique FA2 symbol, admit tile-aligned chunk shapes, and preserve exact fallbacks. Model promotion checks continue in the owned PR. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
|
Final qualification update: keeping this PR in Draft.
No merge until this discrepancy is localized and the relevant gate passes. |
Preserve complete timing, numerical and natural-output evidence. Document the explicit E4M3 wave launch contract and retain the unresolved 256K token-parity gate instead of claiming a passed promotion. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
|
Controlled qualification completed; the strict model token-parity gate still fails, so this PR remains Draft and is not merged. With native Flash and paged-helper binaries held identical, retained/release Additional isolation:17 real-derived dynamic v37 endpoints are bitwise equal The integration document and migration-control entry record the unresolved |
|
The requester explicitly directed merging PR #548 into main after being informed that the controlled 256K natural-generation comparison first differs at token 109. Proceeding as a requester-directed integration with this known issue, not as a passed numerical/model-quality gate. The strict token-identity result remains FAILED and its cause is unresolved; original evidence and failed results are preserved. Current head is 05f28ef; both GitHub checks pass and the branch is cleanly mergeable onto main. This merge adds no further source/default changes, no MTP, and no service restart. Follow-up model-level localization remains outstanding. |
Current status: merged at explicit user direction
Merged into
mainon 2026-09-07 at merge commit8d9c3518992059105d89939e8a46d75184505d8e, after the requester was informed of the model-parity failure and explicitly directed the merge. This is a known-issue integration, not a passed strict numerical/model-quality gate. The 256K natural-generation token-109 divergence remains unresolved.Both pre-merge GitHub checks passed. The fetched merge tree is identical to the tested PR head
05f28efcf364e441146e58c6618a1cf294de1ed4; no additional source changes were introduced by the merge. No MTP, GPU jobs, runtime deployment, or service restart was performed for this merge.The following pre-merge hold and evidence are retained as a historical record; their not-merged/hold statements describe the previous decision, not the current PR state.
Historical pre-merge model-parity hold
Not merged. All planned runtime tests have completed. Speed, operator
precision, build and memory-safety checks pass, but a matched-native256K
natural summary first differs at token109 (157 versus158 tokens). Both
answers are coherent and retrieval-correct; the strict identity gate fails.
See the committed integration audit and qualification comments below.
CPU141 passed/1 GPU skip; GPU33 passed;17 additional dynamic v37 endpoints
are bitwise equal. No source-level cause of model variation is established.
Do not replace this gate with a forced post-EOS or kernel-only check.
Purpose
Integrate the precision-qualified v37 SM70 long-prefill implementation and
an exact E4M3 paged-to-FP16 bridge. Preserve FP32 QK/PV accumulation and
prefix/tail state, support the scheduler's tile-aligned query family, and
retain bounded workspace, explicit rollback and exact fallbacks.
This is prefill-only, not the grouped/MTP work in Draft #524. No MTP was
enabled for this scope. The global
fp8encoding and weight quantizationdefaults are not changed. Existing E4M3 decode wave kernels are unchanged;
the acceptance launch explicitly enables their existing flags so a slow
control and a slow candidate cannot falsely establish speed parity.
Original integration base:
2946e0ed664e0dca452b38745df601c1d9f4404d.Rebased integration base:
6ccf581e127af61dd1ae5cd5b7ef708a5d0ccd70.Owned implementation head:
70c12826460af3dd3fa5560922c3357eea68e7ad.Implementation
a stale legacy extension cannot masquerade as v37.
Q<KV<=262144, KV multiple32; preserve real-query causal offsets when padded.
retain FP16 storage. No claim of real-arithmetic exactness or no KV loss.
Test plan and results
Completed before Draft publication:
0.998963/0.998585 at Q8000/KV128000/256000. This is a port-regression test,
not a speedup attributed to new arithmetic.
prefill/decode endpoints bitwise equal, finite, max-abs0.
KV, graph=eager, L2 about0.023–0.027%. In FP8 TP4 model diagnostics,
restoring existing wave flags improves 256000-input decode16.76→43.06tok/s;
historical50.38tok/s is a different NVFP4-weight contract, not this baseline.
Focused public commands in an SM70-built environment:
Completed model gate, held: matched retained/release TP4 model runs on
physical GPUs0–3 only, MTP off, FP8weights/E4M3KV, graph on, no prefix reuse.
Includes four context lengths, natural-EOS short/long output, recorded
logprobs, and the exact262144 final-context boundary. The controlled result
still has the token109 summary divergence described above. Do not promote
or merge based on forced post-EOS continuation or operator tests alone.
Final attention libraries are rebuilt; shared
_C/stable dependencies remainpinned. This is an explicitly identified source-overlay test, not a claim
that a full newly built wheel has been qualified.
Duplicate check and AI assistance
The open-PR area scan found no other v37 prefill integration. Draft #524
addresses grouped/speculative precision and is deliberately not included.
Codex provided AI-assisted implementation, review and testing at the fork
owner's request. No independent human line-by-line review is claimed.
Detailed numerical scope, failed variants and initial endpoint caveats are
retained in
docs/design/sm70_flash_v37_prefill.md. Final model results arerecorded there; this PR is not ready for promotion.