Repository navigation
Conversation
d60f2a4 to
81f7bb6
Compare
|
Attempted the sm_120 kernel contract on this head (
|
81f7bb6 to
fc50e94
Compare
Port the shared block-attention fold to attn_fold.cuh, restore MiniMax legacy nonfinite behavior, drop DeepSeek sites without flag-zero metadata identity, preserve tensor-core shared-memory shape, and regenerate all affected serving pins.
fc50e94 to
0507849
Compare
|
Closing this experiment: exact, but it does not speed anything up. After two independent reviews we kept only the guard sites whose bit-identity could be proven (nine disputed CUDA sites were restored to main), then ran GB10 A/Bs against main with base/new/new/base ordering:
Skipping the identity rescale costs a compare and a branch per tile, and on these kernels the saved multiply-and-exponential is not the limiting work. The branch stays available if a kernel ever becomes limited by that rescale.
|
What this changes
Online softmax rescales its running state by
exp(old_max - new_max)after each key tile; when the maximum doesn't change that factor is exactly 1. This skips the identity work in the served online-softmax updates on CUDA and Metal, behind guards: the shortcut runs only when the maximum is finite and every skipped operand or fast result is finite, so signed zeros, subnormals, NaN payloads and infinities behave as before.TF_CUDA_SOFTMAX_IDENTITY_GUARD/TF_METAL_SOFTMAX_IDENTITY_GUARD(compile-time, default 1) build the unguarded variant from the same sources so the GPU contract compares the two.Not landing yet
This changes every served attention kernel's default, and the finite checks may cost what they save, so it lands only after the full kernel contract on sm_121, sm_120, M3 Ultra and M5 Ultra (guarded vs unguarded byte equality, planted controls red) and paired whole-request A-B-B-A per family with tokens compared. Kill on any byte or token difference, any slower cell, or under 3% whole-request gain.