SemanticCompute — KernelBench loop closed
A generated softmax kernel diverged (∞/∞ → NaN); the prescribed max-shift fixed it, re-verified compatible.
verification report · 2 checks · DIVERGENCE FOUND
2 special-value divergence(s) (NaN/∞ on one side) — structural, not a rounding tail.
Showing 3 element(s) that are not bit-identical: 3 fail ulp(2), 0 differ but agree under it. Select any row to see its diagnosis and the prescribed fix.
| index | reference | candidate | Δ | diagnosed cause |
|---|---|---|---|---|
| 0 | 0.09003057330846786 | 0.0 | 1035493875 ULP | numeric divergence (reassociation / precision / algorithmic) |
|
diagnosis
1035493875 ULP apart — beyond a rounding residual; likely reassociation (reduction order), precision loss, or an algorithmic difference. prescribed fix
A large gap beyond rounding: pin the reduction/accumulation order to the reference, use compensated or higher-precision accumulation, and check for an algorithmic difference (naive vs stable form). Re-verify — and if the gap is legitimate approximation, state it as an explicit tolerance instead of treating the kernel as wrong. then
Re-run this check against the same reference. SemanticCompute re-verifies the fix; it does not apply it. | ||||
| 1 | 0.2447284758090973 | NaN | special | NaN generation |
|
diagnosis
The candidate is NaN while the other is finite — likely an unguarded 0/0, sqrt of a negative, or inf−inf. prescribed fix
Guard the step that produces NaN: mask before the divide (avoid 0/0), clamp the domain of sqrt/log, or add the masked-position guard (the FlashAttention/vLLM masked-softmax fix). Then re-verify. then
Re-run this check against the same reference. SemanticCompute re-verifies the fix; it does not apply it. | ||||
| 2 | 0.6652409434318542 | NaN | special | NaN generation |
|
diagnosis
The candidate is NaN while the other is finite — likely an unguarded 0/0, sqrt of a negative, or inf−inf. prescribed fix
Guard the step that produces NaN: mask before the divide (avoid 0/0), clamp the domain of sqrt/log, or add the masked-position guard (the FlashAttention/vLLM masked-softmax fix). Then re-verify. then
Re-run this check against the same reference. SemanticCompute re-verifies the fix; it does not apply it. | ||||
Prescribed fixes
A large gap beyond rounding: pin the reduction/accumulation order to the reference, use compensated or higher-precision accumulation, and check for an algorithmic difference (naive vs stable form). Re-verify — and if the gap is legitimate approximation, state it as an explicit tolerance instead of treating the kernel as wrong.
Guard the step that produces NaN: mask before the divide (avoid 0/0), clamp the domain of sqrt/log, or add the masked-position guard (the FlashAttention/vLLM masked-softmax fix). Then re-verify.
Every compared element agrees under this tolerance. Nothing to prescribe.