﻿# GPU mixed precision: separate multiplication and accumulation formats

GPU mixed precision is a sequence of storage, multiplication, accumulation and conversion choices; a single format label does not fully describe its error behavior.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-mixed-precision-accumulation/
Language: en

Mixed-precision computation can use one format for stored inputs, another for multiplication and another for accumulation or output. These choices affect range, rounding and data movement differently. Reading them as one vague precision label hides the actual numerical path that produces an inference or rendering result.

## Storage and computation answer different questions

A compact stored value reduces bytes but also limits what information reaches the arithmetic operation. Widening it later cannot recover detail already lost during conversion. An accumulator with a wider range or significand can reduce further rounding loss while summing many products. It does not undo the original input approximation. The complete numerical description therefore follows values through each conversion rather than naming only the largest format appearing somewhere in the kernel.

Primary reference: [Floating Point and IEEE 754 Compliance for NVIDIA GPUs](https://docs.nvidia.com/cuda/floating-point/).

## A long dot product exposes accumulation

Imagine summing products with different magnitudes. Small contributions can disappear when added to a much larger partial sum in a limited format. A different accumulation path can change that loss even if input storage remains unchanged. The example is conceptual rather than a benchmark. It motivates testing distributions with mixed magnitudes and cancellation, because a uniform positive input can make several numerical paths appear more similar than they are.

Primary reference: [CUDA Programming Guide: Writing SIMT Kernels](https://docs.nvidia.com/cuda/cuda-programming-guide/02-basics/writing-cuda-kernels.html).

## Range and precision are not interchangeable

A format with a broad exponent range may still represent nearby values coarsely. Another format may provide finer spacing within a smaller range. Overflow, underflow and rounding therefore require different test cases. Scaling can change which part of the representable range is used, but introduces its own metadata and conversion requirements. A format choice should be explained through the values expected in the operation rather than treated as a universal quality ranking.

Primary reference: [CUDA C++ Best Practices Guide](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/).

## The library selects a concrete implementation

A high-level matrix call can dispatch different kernels depending on formats, shapes and configuration. The requested input type alone may not establish the internal arithmetic mode. Read the library’s documented options and preserve the selected configuration in the experiment. If a backend changes its allowed numerical path, investigate output behavior again. That is a change in the implementation contract, even when the surrounding application function keeps the same name.

## Evaluate errors at the consuming boundary

Numerical differences matter through what consumes the result. A small matrix deviation may be harmless for one output and consequential near a threshold in another. Compare both an appropriate numerical reference and the application’s acceptance cases. Record formats at each stage, scaling and accumulation behavior. This produces a useful precision decision without equating every different bit with failure or every plausible final answer with a validated numerical implementation.

Related reading: [A GPU inference benchmark you can trust](/journal/inference-benchmark-method/); [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/).
