Struct Qnn_MicroscalingEncoding_t

Nested Relationships

Struct Documentation

struct Qnn_MicroscalingEncoding_t

A struct to express Microscaling quantization parameters. A tensor is divided into blockCount blocks of shape blockDimensions. Each block has an associated scale factor.

Public Members

Qnn_FloatEncoding_t valueEncoding

Defines which floating point encoding quantized data uses.

uint32_t blockRank

Size of the blockDimensions array. Must equal the rank of the associated tensor

uint32_t *blockDimensions

Dimensions of each block.

uint32_t blockCount

Number of blocks. Each block has an associated scale factor.

Qnn_DataType_t scaleDataType

Scale factor data type.

union unnamed

Array of size blockCount.

Public Members

uint8_t *blockScales8

Used when scaleDataType is QNN_DATATYPE_FLOAT_8. Note this field is an array. The scale factor for block i is pow(2, blockScales8[i] - 127)

float *blockScalesFloat

Used when scaleDataType is QNN_DATATYPE_FLOAT_16 or QNN_DATATYPE_FLOAT_32. Note this field is an array.