HexagonTpu. TensorInfo
(hexagon_tpu v0.1.0)
Copy Markdown
Metadata for one graph input/output tensor, extracted from the QNN context binary.
type is the Nx type of the raw on-device data. For quantized tensors
(quant not nil) the logical values are floats recovered with
float = (q - zero_point) * scale (see HexagonTpu.Quant).
Summary
Functions
Maps a raw Qnn_DataType_t integer to {qnn_type_atom, nx_type}.
Types
@type quant() :: nil | %{scale: float(), zero_point: integer()} | %{axis: non_neg_integer(), scales: [float()], zero_points: [integer()]}
@type t() :: %HexagonTpu.TensorInfo{ byte_size: non_neg_integer(), index: non_neg_integer(), name: String.t(), qnn_type: atom(), quant: quant(), shape: tuple(), type: Nx.Type.t() }