#[repr(C)]pub struct EfQuantizationInfo {
pub axis: i32,
pub count: u32,
pub has_quantization: u32,
}Expand description
Presence/shape summary of a tensor’s quantization metadata.
The first half of the two-call idiom ef_tensor_quantization_info /
ef_tensor_quantization_get use: this scalar block tells the caller
whether quantization is attached and how big a buffer the second call
needs, without allocating on either side of the boundary –
Quantization itself is variable-length (an axis plus per-axis scales
and zero_points), so unlike ef_tensor_plane/ef_tensor_view_origin
this view cannot carry the payload itself.
has_quantization is a presence flag, not a sentinel, for the same
reason EfViewOrigin::has_origin is: axis 0 and a scale of 0.0 are
both legitimate values, so there is no unused bit pattern to repurpose as
“absent” without colliding with a real one.
Fields§
§axis: i32Channel axis for per-channel quantization; -1 for per-tensor (no
axis). Meaningful only when has_quantization != 0.
count: u32Number of entries in the scale/zero_point arrays (1 for
per-tensor). Meaningful only when has_quantization != 0.
has_quantization: u32Non-zero when this tensor carries quantization metadata; 0 when it
does not, in which case axis and count are both zeroed and
unused.