HexagonTpu. Graph
(hexagon_tpu v0.1.2)
Copy Markdown
An executable graph retrieved from a loaded context.
execute/3 is the Nx boundary: it takes Nx tensors, handles
quantization per the graph's tensor metadata, runs inference on the
backend, and returns Nx tensors.
Summary
Functions
Runs inference.
Graph metadata (HexagonTpu.GraphInfo).
Retrieves a graph by name. With nil (default), the context must contain
exactly one graph.
Types
@type t() :: %HexagonTpu.Graph{ context: HexagonTpu.Context.t(), info: HexagonTpu.GraphInfo.t(), resource: reference() }
Functions
Runs inference.
inputs is a list of Nx tensors (positional, matching
info.inputs order) or a map of %{"tensor_name" => tensor}.
Options:
:quantize-:auto(default) quantizes{:f, 32}inputs to the tensor's on-device quantized type;:nonerequires exact-type input.:dequantize-:auto(default) dequantizes quantized outputs to{:f, 32};:nonereturns raw on-device types.:output-:list(default) or:map(keyed by tensor name).
Graph metadata (HexagonTpu.GraphInfo).
Retrieves a graph by name. With nil (default), the context must contain
exactly one graph.