﻿# Quark for Ryzen AI: BF16 rounding, storage and profiler scope

Trace Quark’s ONNX precision flows through with_cast storage, actual CPU/NPU graph placement and the quantization profiler’s measurement boundary.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/quark-ryzen-ai-bf16-cast-storage-profiling-boundaries/
Language: en

AMD Quark’s Ryzen AI documentation describes supported optimization flows, but a precision label is not a measured deployment result. The concrete task is to trace an exported ONNX artifact through conversion, compilation, provider assignment and application evaluation. These stages can use different storage types and devices, making a single file-size or profiler number an incomplete description.

## Use the current document identities

The reviewed [Quark Ryzen AI page](https://quark.docs.amd.com/latest/supported_accelerators/ryzenai/index.html) identifies Quark 0.13 and describes CNN INT8 or BF16, Transformer BF16 and LLM INT4 or BF16 flows. These are workflow categories, not proof that every architecture or exported graph will run fully on every listed accelerator.

The rolling [Ryzen AI PDF](https://ryzenai.docs.amd.com/_/downloads/en/latest/pdf/) currently identifies release 1.9.0, rather than the earlier edition named in the incoming research note. Its deployment section explains that supported subgraphs execute on the NPU while remaining regions execute on CPU. Therefore the presence of an NPU provider does not establish exclusive NPU execution, and current documentation must not be assigned retroactively to an older package.

## BF16 rounding need not mean BF16 storage everywhere

The [BF16 conversion guide](https://quark.docs.amd.com/latest/supported_accelerators/ryzenai/tutorial_convert_fp32_or_fp16_to_bf16.html) explains the with_cast representation: selected boundaries receive a cast to BF16 followed by a cast back to FP32. The first operation applies BF16 rounding; the second restores FP32 storage for the next operator. Model inputs and outputs can retain their own specified interface types.

This is an important distinction when assessing memory. A graph that models lower-precision values does not automatically store every intermediate at half the original width, nor does an ONNX cast sequence prove the final hardware kernel’s internal arithmetic. Compilation and optimization can change the executable representation. The [mixed-precision guide](/journal/learn-mixed-precision-accumulation/) explains why storage, multiplication and accumulation need separate evidence.

## The profiler measures the quantization process

The [Quark profiling tutorial](https://quark.docs.amd.com/latest/onnx/tutorial_profiling.html) describes CPU and GPU memory, disk activity and timing across preprocessing, calibration, quantization and postprocessing. Its sample output is illustrative. Those values should not be recast as a measured Ryzen NPU deployment or an inference-memory requirement.

Even a real profiler run would need its process boundary recorded. Host RSS during calibration differs from the compiled model’s runtime buffers, and a GPU used to accelerate conversion may not be the eventual inference device. Selecting only an estimated high-memory layer can help investigate a preparation bottleneck, but it does not automatically characterize the peak of every complete workload.

## Compare quality and placement before claiming efficiency

A useful evaluation retains an unconverted reference and checks held-out application cases alongside numerical differences. The deployment record should include model revision, export options, Quark and runtime versions, target hardware and the actual graph partition. Successful export establishes an artifact; successful session creation establishes another milestone; neither establishes acceptable task quality.

Then measure initialization and warmed execution separately, recording compiled-cache state and memory where the work actually occurs. The [provider-partition guide](/journal/fg2-onnxruntime-provider-priority-subgraph-partition/) helps interpret residual CPU work. No conversion, compilation or hardware comparison was executed for this article. The primary documents support a reproducible decision framework and a specific correction about BF16 cast storage, rather than an invented universal speed or memory improvement.
