HexagonTpu.Context (hexagon_tpu v0.1.0)

Copy Markdown

A loaded QNN context: a pre-compiled context binary (produced on the host with qnn-context-binary-generator) deserialized onto the backend.

Graph and tensor metadata is introspected once at load time via QnnSystem and cached in the struct.

Summary

Functions

Frees the on-backend context. Idempotent; live Graph handles from this context become unusable.

Loads a context binary from an in-memory binary.

Loads a context binary from a file path.

Graph metadata (names, input/output tensors) for this context.

Types

t()

@type t() :: %HexagonTpu.Context{
  graphs: [HexagonTpu.GraphInfo.t()],
  resource: reference(),
  runtime: HexagonTpu.Runtime.t()
}

Functions

close(context)

Frees the on-backend context. Idempotent; live Graph handles from this context become unusable.

from_binary(runtime, binary)

Loads a context binary from an in-memory binary.

from_file(runtime, path)

Loads a context binary from a file path.

graphs(context)

Graph metadata (names, input/output tensors) for this context.