Repository navigation
[Kernel][SM70] Fold DeepSeek V4 MXFP4 decode exponents - #312
yangzhuxinyzx wants to merge 1 commit into
Conversation
Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
|
Latest-main audit update (main d9d0da2): leave this PR open, but do not merge the current performance claim yet. Source audit found repairable issues in the original stack: C++ reads the environment directly and can bypass the Python scale audit; the old extension capability is not distinguishable; the route logs before folded-kernel selection; and a missing mirrored kernel returns no launch instead of the numerically valid ordinary transform. I rebuilt a local repair with a distinct folded op, per-layer validated admission, default fallback / explicit fail-closed behavior, generic tensor/runtime naming, and ordinary-kernel fallback. Focused math/config/module tests, full pre-commit, and standalone compilation of torch_bindings.cpp, awq_sm70_gemm.cu, gemm.cu, and sm70_884_4.cu all pass. However, the stored performance evidence does not pass attribution:
This pattern is consistent with graph-capture/dispatch-cache order, not a 1.805 ms/token exponent-fold gain. The production-relevant gate must independently prewarm identical ordinary tactics before capturing each arm, use the merged direct-order main baseline, and then show a positive A/B/B/A result. All eight V100s are currently occupied by existing services, so I am not perturbing them for a rerun. I am not closing #312. Once clean matched evidence is available, the repaired source design can be promoted and merged; until then, merging or default-enabling it would import a measured warm-path regression. |
|
Public development has ended and this PR head was preserved in the private migration archive before closure. The public repository is frozen at v1.3.0 and will be archived read-only. Thank you for the contribution. |
|
Public development has resumed through #342, and this PR was unarchived, unlocked, and restored as a Draft at its preserved stacked head. The prior audit remains binding: independently warmed folded W13/W2 did not show a positive result, so fresh matched evidence and the repaired fallback design are required before merge. |
|
Closing the exponent-fold experiment after the matched warm-path audit failed to reproduce a speed benefit. Independently warmed W13 measured 32.421 → 32.706 µs and W2 19.183 → 19.302 µs; the earlier 95 → 53 µs result depended on graph-capture/dispatch-cache ordering. The exactness checks remain useful evidence, but do not establish an optimization to enable. The ordinary decode path remains unchanged. The branch and audit discussion are retained. Future work can reuse the arithmetic proof with independently warmed, matched tactics before proposing a new optimization. |
Purpose
Stacked on #309. Fold the exact E2M1 conversion factor into adjusted UE8M0 exponents for the DeepSeek V4 PP2 x TP4 M=6 direct-order decode shapes. Preserve the ordinary measured CTA, split-K, and swizzle so the reduction order and output bits stay unchanged.
Test Plan
Test Result