[Kernel][WIP] Port FlashInfer GDN and HC layer fusion to SM70 - #515
Draft
yangzhuxinyzx wants to merge 3 commits into
Draft
[Kernel][WIP] Port FlashInfer GDN and HC layer fusion to SM70#515yangzhuxinyzx wants to merge 3 commits into
yangzhuxinyzx wants to merge 3 commits into
Conversation
Preserve FP16 convolution product and residual rounding, FP32 recurrent state, and cooperative grid synchronization. Keep runtime dispatch unchanged while screening complete operator chains before consolidated E2E validation. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Specialize Torch operator namespaces per GDN geometry and keep candidate/reference recurrent histories independent. Add mixed-precision HC oracle and graph replay cases. GPU validation is still pending a foreign lease release. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Record checkpoint-weight paired GPU gains with independent FP32 recurrent histories. Reject the slower shared-staging HC path; add a bounded register-staging candidate and retain all serving defaults. Further GPU validation is waiting for the foreign lease. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Port real FlashInfer layer-fusion computation to SM70 and finish operator
screening before a consolidated model E2E/quality run. No serving defaults
are changed by this benchmark prototype.
755baae1d075ee04fa9096b23fc0225b23589a86(main).e2061d5049.72af224161.6c14bbd5ff34210404d5d4b5f6ff3b4b2527f59f.FP16 activations, graph-safe cooperative grid synchronization.
materialized-residual rounding and Gemma affine semantics.
mul.f16 -> cvt.f32.f16convolution boundaryconfirmed in captured Triton PTX; do not silently use widened products.
Duplicate audit: this is not #513's QSA kernel nor #504's batch HC TP sharding.
M1 #506/#510 work and previous v0.6.13 negative probes are left untouched.
The existing TurboMind quantization and native/FA paths are not replaced.
Test Plan
poisoned-buffer eager/graph replay.
real checkpoint GDN weights, FP32 state, unchanged numerical gates.
lifetime/synchronization checks; only integrate operator winners.
quality validation. Micro timings do not establish model quality or TPS.
Test Result
Python 3.12.13 / Torch 2.10.0+cu128 / CUDA 12.8.
distinct Torch operator namespaces avoid geometry registration collisions.
33.39 s. Independent GDN histories, HC oracle and graph replay pass.
B4 28.604 → 15.087 us, B8 33.041 → 22.801 us,
B16 57.344 → 47.343 us. All 256-step independent-history screens pass.
These are component timings, not model throughput or quality admission.
Updated GPU suite: 20 passed, including the new register variant.
FP16 B16: current 3.164 us vs register HC 3.779 us. Neither is enabled.
clang-format, Markdown and repository-specific checks.
The user subsequently freed GPU 4–7; component checks above completed there.
Runtime integration and E2E evidence are tracked separately in [Kernel][WIP] Integrate native FlashInfer SM70 batch GDN and QSA probes #523.
is claimed. Retain existing M1 projection and HC paths.
Worklog:
docs/design/sm70_flashinfer_layer_fusion.md.All build/test caches are task-private and generated files are unversioned.
Reference QLA source matches the retained current baseline; hash in worklog.
Keep Draft. FP16-state compression and failed prior GEMV/HC substitutions
are deliberately not retried or promoted. No deployed API is touched.
This work is AI-assisted (Codex). Human review is required before admission;
commits have DCO sign-off and AI attribution.
September 6 integration note: #523 exposed and corrected a prefill-trace specialization that initially bypassed fused GDN. Its first model result is therefore QSA-only, not a GDN speedup; it also has a negative small-sample tool-quality signal. The corrected combined run completed in #523: C4/8/16 throughput +6.98% / +7.00% / +7.35%, with both native paths selected, but offline BFCL is 49/64 vs 52/64 control. All throughput targets remain unmet and quality is unadmitted. Keep default-off/Draft; all owned GPU workers exited.