TECHNOLOGY

ONNX CUDA sparse attention: rescaling can erase an earlier tile before a large value scale

In this article
THE QUICK TAKE

The v0.4.0 DSA fallback protects earlier scaled contributions during running-max rescaling; test tile order and value scale together.

CUDA Plugin EP v0.4.0 includes an FP32 fallback for an INT8 tensor-core sparse-attention rescaling edge case. The linked analysis shows how an exponential rescale can become zero when a later score raises the running maximum, even though a large value scale makes the earlier contribution significant in the final result.

A tiny multiplier can multiply a large contribution

Discarding a small factor is not harmless when its associated value can be very large. The PR’s failure involves a previously accumulated contribution, not simply scores within the current tile. A reference calculation should use enough range to preserve the final representable answer. Testing only ordinary value scales may never expose the loss, because the discarded contribution is then genuinely below the chosen output tolerance.

The later maximum is part of the reproducer

Arrange an earlier tile with a meaningful value and a later tile that raises the running maximum substantially. Reversing the order can take a different numerical path even with the same candidates. A proposed suite should include both orders and several split configurations, comparing with a trusted reference. That isolates online-rescaling behaviour from ordinary quantization error and from a completely missing attention candidate.

Fallback eligibility should be observed

Upstream arms the special handling for a large-scale regime and retains the ordinary route elsewhere. A local check should confirm both the triggered guard and an unaffected control. A slower edge-case execution can be the correct outcome if it preserves a contribution the fast path would lose. Do not treat fallback as a generic backend failure or demand that every input remain on the tensor-core implementation.

Keep the release claim numerical and bounded

The release reports this protection; the PR supplies an attributed test and platform result. This article adds no independent measurement or model-quality score. A passing regression supports the tested rescale condition, not every low-precision attention path. The operational value is preserving a mathematically significant earlier contribution instead of assuming that a flushed intermediate always corresponds to negligible final work.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles