Skip to content

[Bugfix][SM70] Restore DFlash2 prefill closure - #350

Merged
yangzhuxinyzx merged 7 commits into
mainfrom
codex/v100-dflash2-prefill-closure-20260826-173751
Aug 27, 2026
Merged

yangzhuxinyzx merged 7 commits into
mainfrom
codex/v100-dflash2-prefill-closure-20260826-173751

Conversation

@yangzhuxinyzx

Copy link
Copy Markdown
Contributor

Public migration note (2026-08-27): this Draft is the public continuation of private PR #22, mirrored at exact head 702722b after public main resumed through #342. The original implementation notes and evidence are preserved below.

Purpose

Restore the accepted SM70 D256 prefill operators when a source overlay shadows
the bundled FA2 extension, then close the remaining NVFP4 large-M prefill gap
without changing DFlash2 M<=8 verification. This is stacked on private
quality-audit PR #18.

Test Plan

  • Exercise bundled, missing, partially loaded, and explicit-sidecar loader paths.
  • Require real dense and paged D256 operators before retained benchmarks.
  • Run same-card cold 32K/64K DFlash2 prefill pairs with prefix cache reset.
  • Separate FP32-SSM Q3296/Q6592 from FP16-SSM Q7920 geometry.
  • Microbenchmark TurboMind versus bounded QPN4 large-M NVFP4 projections.
  • Gate the QPN2-packed prefill candidate on layout/numerical parity, 32K/64K
    speed, unchanged M<=8 validation cost, PPL, and scored coding quality.

Test Result

  • Focused D256 loader/status tests: 6 passed; partially loaded runtime
    capability regression: 2 passed.
  • QPN2/QPN4 policy and dispatch tests: 3 passed.
  • Ruff check/format, Python compile, shell syntax, and git diff check: passed.
  • Missing-extension cold baseline: 32K 10.485347 s (3125.12 tok/s), 64K
    25.317796 s (2588.54 tok/s).
  • Stable D256 sidecar with FP32 SSM/Q3296: 32K 9.425490 s (3476.53 tok/s,
    +11.24%), 64K 21.120102 s (3103.02 tok/s, +19.87%).
  • FP32 SSM/Q6592 is neutral: 3481.83/3077.03 tok/s at 32K/64K.
  • FP16 SSM/Q7920 is rejected on speed: 3271.49/2827.03 tok/s.
  • Every measured request above retains the same first-token hash.
  • Single-V100 M3296 projection microbenchmark:
    • fused gate/up: 5.351 -> 3.896 ms (-27.19%);
    • down: 2.646 -> 1.866 ms (-29.47%).
  • The staged large-M candidate reuses already resident QPN2 codes/scales plus
    one shared 85-MiB FP16 workspace. It is default-off; M<=8 remains QPN2.
  • GPU layout, full-model, validation-cost, and quality gates are pending behind
    active GPU owners. No pending candidate is enabled by default.

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>
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
@yangzhuxinyzx

Copy link
Copy Markdown
Contributor Author

Projected-main source audit (current main plus repaired #346) is complete for head 702722bab51731812e561011cadc139f8b8148d1:

  • The [Bugfix][SM70] Restore DFlash2 prefill closure #350-only 9-file delta merges without conflict over the repaired [Bugfix][SM70] Audit DFlash2 output quality #346 tree.
  • Reviewed the explicit D256 sidecar loader and capability validation. It only loads a user-selected library, verifies the real dense/paged operators, catches import/load/runtime failures, and retains the existing fallback otherwise.
  • Reviewed the QPN2-packed large-M route. It reuses the existing per-device bounded FP16 workspace and zero-copy QPN2 code/scale views; M<=8 behavior is unchanged. Because its full-model quality/layout gates are still pending, the new large-M route correctly remains explicit opt-in, while the measured D256 sidecar recovery remains available.
  • git diff --check, Python compile, benchmark CLI parsing, and all changed-file pre-commit hooks passed.
  • Focused CPU/source-contract tests passed: benchmark loader status 3/3, Flash-V100 routing/policy 113/113, QPN2 preparation/dispatch 3/3 (119 total).
  • Recorded V100 D256 evidence is positive with identical first-token hashes: 32K +11.24%, 64K +19.87%. Rejected FP16/Q7920 and neutral Q6592 variants remain rejected/not selected.

No source blocker found. After #346 reaches main I will retarget this PR, recompute the exact merge tree, and merge if the head remains locked.

@yangzhuxinyzx
yangzhuxinyzx changed the base branch from codex/v100-dflash2-quality-audit-20260826-124851 to main August 27, 2026 16:25
@yangzhuxinyzx
yangzhuxinyzx marked this pull request as ready for review August 27, 2026 16:26
@yangzhuxinyzx
yangzhuxinyzx merged commit 093f789 into main Aug 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant