﻿# ONNX CUDA INT8 sparse attention defaults: changed accumulation order is not bitwise regression evidence

The v0.4.0 DSA default changes accumulation order; compare justified numerical tolerances and task behaviour, retaining the documented old-kernel control.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-ort-dsa-int8-default-order-change/
Language: en

CUDA Plugin EP v0.4.0 enables INT8 tensor-core DynamicSparseAttention kernels by default and explicitly notes a different accumulation order. The release says results are not bit-identical to earlier versions and provides switches for previous kernels. That makes the numerical comparison contract part of upgrade qualification, even when model weights and input tokens are unchanged.

## Floating accumulation depends on order

Rearranging a reduction can change rounding without changing the intended real-valued expression. The release explicitly identifies that expectation for the new kernels. A bitwise mismatch alone is therefore not enough to diagnose a defect. Conversely, “different order” is not permission for arbitrary error. Establish tolerances against a trusted reference and inspect worst cases, rather than dismissing every discrepancy as an inevitable consequence of acceleration.

## Keep the documented old route as a control

The release exposes separate switches for the new prefill and decode kernels. A proposed comparison toggles them independently while keeping all other settings fixed. This can isolate which phase introduces a discrepancy and prevents a whole-pipeline comparison from hiding the responsible route. Record effective switch values with the runtime version; installing a new build does not guarantee that an environment override left its default path enabled.

## Task behaviour adds another observation layer

A small logit change can alter a near-tied greedy token and then the rest of a generated sequence. Token divergence is useful evidence of behavioural sensitivity but not automatically a task failure. Evaluate the intended task metrics alongside operator error and deterministic controls. Keep input, cache state and decoding policy identical. Without those controls, unrelated sampling or context changes can be incorrectly attributed to the new accumulation order.

## Do not replace qualification with a speed headline

Upstream reports performance-oriented changes on specific configurations. Those results do not validate every model’s accuracy or predict identical gains on another GPU. This article reports the default and numerical behaviour change without new benchmarks. A sound upgrade result combines verified dispatch, bounded operator error, task evaluation and separate phase timings, preserving both the benefit and the practical limits of the new default.

## Sources

- [ONNX Runtime plugin-ep-cuda/v0.4.0 release](https://github.com/microsoft/onnxruntime/releases/tag/plugin-ep-cuda/v0.4.0)
- [ONNX Runtime pull request #33802](https://github.com/microsoft/onnxruntime/pull/33802)

## Related reading

- [llama.cpp b12202 and the difference between a precision request and an accumulator](/journal/news-llamacpp-b12202-precision-request-vs-accumulator/)
- [CUDA events and request time: different measurement boundaries](/journal/gpu-cuda-events-wall-time/)
