TECHNOLOGY

QNN QDQ calibration: corpus quality and HTP coverage are separate

In this article
THE QUICK TAKE

Representative calibration and confirmed HTP graph coverage are independent checks; a valid QDQ file establishes neither task quality nor total NPU execution.

QNN’s ONNX Runtime documentation makes calibration a model-quality decision, not a formality before running on an NPU. A random-input example demonstrates the reader interface while explicitly warning about inaccurate quantization. The useful workflow separates the exported graph, its calibration evidence and the actual hardware assignment; producing a QDQ file verifies only part of that chain.

Treat random calibration as an interface example

The pinned QNN guide says representative input data is crucial. Its random-data reader is illustrative, with an explicit warning that such inputs will probably produce an inaccurate model. Copying the reader unchanged can exercise the software path while failing to represent the application’s activation distribution.

A defensible comparison would identify the calibration sample set and preprocessing, then evaluate on separate held-out cases. Increasing the number of samples does not automatically repair a distribution mismatch. It is also important to distinguish changing calibration data from changing the precision scheme or graph: otherwise an observed quality difference has several possible causes.

QDQ expresses a numerical contract

The general ONNX Runtime quantization guide explains that static calibration writes activation quantization parameters into the model. Its QDQ representation surrounds tensors with quantization and dequantization operations. That representation is not proof that every such operation becomes a native integer hardware instruction.

The QNN example distinguishes activation and weight types and directs users to operator-specific support. A single “quantized” label therefore does not establish compatibility of all tensor types. If selected regions are promoted to higher precision, boundary conversions also become part of the graph. Preserve scales, data types and transformed operators with the artifact, rather than treating the calibration corpus as its only defining input.

Confirm the HTP assignment separately

The reviewed HTP instructions require fixed shapes and describe a subset of supported ONNX operators. They also show a session option that raises an error when the whole model cannot run on the requested HTP path, rather than silently allowing unsupported work to remain on the CPU provider.

That diagnostic setting is useful for establishing coverage, while a mixed-provider application can be a deliberate design of its own. Report which case was measured. The provider-partition guide explains why selecting a provider is not a promise that it receives the entire graph or a general retry policy after runtime failure.

Separate conversion costs from deployment costs

The guide separates the host used for quantization utilities from the target device used for HTP execution. Conversion time, host peak memory, model-file size, session creation and warmed inference latency are therefore different measurements. A calibration change need not shrink the graph’s storage or reduce inference memory simply because it improves quality.

Context-binary caching can change initialization work too, so record whether compilation or cache loading is included in a timer. The quantization-quality guide provides the complementary application checks. No corpus sweep or NPU execution was performed here; the result is a source-backed protocol for comparing such a sweep. The current pinned guide is newer than the version named in the incoming research note, so its capabilities should not be assigned retroactively to an older package.

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