{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "cf2246a7ad439fa38d57462118e7840e5497a685",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "",
      "name": "tensor",
      "path": "helia_aot.air.tensor",
      "submodules": [],
      "summary": "",
      "symbols": [
        {
          "description": "",
          "examples": [],
          "id": "helia_aot.air.tensor.TensorId",
          "kind": "attribute",
          "language": "python",
          "members": [],
          "name": "TensorId",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "TensorId = str",
          "source": {
            "line": 12,
            "path": "helia_aot/air/tensor.py",
            "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L12"
          },
          "summary": ""
        },
        {
          "description": "AIR tensor representation.",
          "examples": [],
          "id": "helia_aot.air.tensor.AirTensor",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.id",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "id",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "id: TensorId = Field(..., description='Unique tensor identifier')",
              "source": {
                "line": 34,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L34"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.kind",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "kind",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "kind: AirTensorKind = Field(AirTensorKind.SCRATCH, description='The kind of tensor')",
              "source": {
                "line": 35,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L35"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.quantization",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "quantization",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "quantization: AirQuantizationParameters | None = Field(default_factory=AirQuantizationParameters, description='Quantization parameters for the tensor')",
              "source": {
                "line": 36,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L36"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.sparsity",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "sparsity",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "sparsity: AirSparsityParameters | None = Field(default_factory=AirSparsityParameters, description='Sparsity parameters for the tensor')",
              "source": {
                "line": 39,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L39"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.buffer_index",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "buffer_index",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "buffer_index: int | None = Field(None, description='Index of the buffer this tensor is mapped to')",
              "source": {
                "line": 52,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L52"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.local_name",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "local_name",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "local_name: str | None = Field(None, description='Local name for the tensor')",
              "source": {
                "line": 53,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L53"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.shape_signature",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "shape_signature",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "shape_signature: tuple[int, ...] | None = Field(None, description='Shape signature of the tensor')",
              "source": {
                "line": 54,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L54"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.has_rank",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "has_rank",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "has_rank: bool = Field(False, description='Indicates if the tensor has a rank')",
              "source": {
                "line": 55,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L55"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.alias_of",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "alias_of",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "alias_of: TensorId | None = Field(None, description='Optional alias for this tensor')",
              "source": {
                "line": 56,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L56"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.inferred_value",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "inferred_value",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "inferred_value: Array | None = Field(default=None, repr=False, description='Compile-time value that shape propagation computed for a shape-expression tensor: the output of a SHAPE, or of a STRIDED_SLICE or PACK over one. An operator still produces the tensor at run time, so this is not constant data; code that needs a constant reads `data`. FoldStaticShapeExpressions moves the value into `data` and removes the producing operator.')",
              "source": {
                "line": 57,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L57"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.alignment_hint",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "alignment_hint",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "alignment_hint: int | None = Field(None, description='Alignment hint for the tensor in bytes')",
              "source": {
                "line": 67,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L67"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.fixed_offset",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "fixed_offset",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "fixed_offset: int | None = Field(None, description=\"Mandatory arena-relative byte offset imposed by an external compiler (e.g. Vela's OfflineMemoryAllocation for an Ethos-U subgraph). When set, the memory planner must place this tensor at exactly this offset within its writable arena instead of choosing one, because the offset is baked into a command stream. Such tensors may intentionally overlap one another.\")",
              "source": {
                "line": 68,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L68"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.packed_from",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "packed_from",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "packed_from: TensorId | None = Field(None, description='Id of the tensor whose data a conversion-time repacking produced this one from. memory.tensors rules resolve against that id (see placement_id).')",
              "source": {
                "line": 78,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L78"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.layout",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "layout",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "layout: str | None = Field(None, description='Weight layout of repacked data, e.g. NT_N_PACKED')",
              "source": {
                "line": 85,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L85"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.shape",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "shape",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "shape: tuple[int, ...]",
              "source": {
                "line": 102,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L102"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.dtype",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "dtype",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "dtype: np.dtype",
              "source": {
                "line": 121,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L121"
              },
              "summary": ""
            },
            {
              "description": "Return the data of the tensor.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.data",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "data",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "data: npt.NDArray | None",
              "source": {
                "line": 136,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L136"
              },
              "summary": "Return the data of the tensor."
            },
            {
              "description": "Quantization parameters, which must be present.\n\n``quantization`` is Optional so a tensor can carry none; kernels that\nrequire quantized inputs read through this view and get a clear error\nnaming the tensor instead of an attribute access on ``None``.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.quant",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "quant",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "quant: AirQuantizationParameters",
              "source": {
                "line": 154,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L154"
              },
              "summary": "Quantization parameters, which must be present."
            },
            {
              "description": "Return the size of the tensor.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.size",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "size",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "size: int",
              "source": {
                "line": 166,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L166"
              },
              "summary": "Return the size of the tensor."
            },
            {
              "description": "Return the number of bytes in the tensor.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.nbytes",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "nbytes",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "nbytes: int",
              "source": {
                "line": 177,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L177"
              },
              "summary": "Return the number of bytes in the tensor."
            },
            {
              "description": "Return the number of dimensions of the tensor.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.ndim",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "ndim",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "ndim: int",
              "source": {
                "line": 186,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L186"
              },
              "summary": "Return the number of dimensions of the tensor."
            },
            {
              "description": "Check if the tensor is a constant.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.is_constant",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "is_constant",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "is_constant: bool",
              "source": {
                "line": 191,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L191"
              },
              "summary": "Check if the tensor is a constant."
            },
            {
              "description": "Check if the tensor is a persistent variable.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.is_persistent",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "is_persistent",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "is_persistent: bool",
              "source": {
                "line": 196,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L196"
              },
              "summary": "Check if the tensor is a persistent variable."
            },
            {
              "description": "Check if the tensor is a scratch tensor.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.is_scratch",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "is_scratch",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "is_scratch: bool",
              "source": {
                "line": 201,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L201"
              },
              "summary": "Check if the tensor is a scratch tensor."
            },
            {
              "description": "Id that ``memory.tensors`` rules match: the source id for a repacked copy.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.placement_id",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "placement_id",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "placement_id: TensorId",
              "source": {
                "line": 206,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L206"
              },
              "summary": "Id that memory.tensors rules match: the source id for a repacked copy."
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.name",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "name",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "name: str",
              "source": {
                "line": 211,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L211"
              },
              "summary": ""
            },
            {
              "description": "Return the C type of the tensor.\n\nThis is used for generating C code that operates on the tensor.\nFor example, if the tensor is of type int16, the C type will be int16_t.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.ctype",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "ctype",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "ctype: str",
              "source": {
                "line": 215,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L215"
              },
              "summary": "Return the C type of the tensor."
            },
            {
              "description": "Return the alignment floor based on the tensor's dtype.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.dtype_alignment_floor",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "dtype_alignment_floor",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "dtype_alignment_floor: int",
              "source": {
                "line": 248,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L248"
              },
              "summary": "Return the alignment floor based on the tensor's dtype."
            },
            {
              "description": "Return a NHWC padded shape tuple, padding missing axes with 1.",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.get_shape_nhwc",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "get_shape_nhwc",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "get_shape_nhwc(pre: bool = True) -> tuple[int, int, int, int]",
              "source": {
                "line": 252,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L252"
              },
              "summary": "Return a NHWC padded shape tuple, padding missing axes with 1."
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_aot.air.tensor.AirTensor.get_shape_with_axis_expanded",
              "kind": "method",
              "language": "python",
              "members": [],
              "name": "get_shape_with_axis_expanded",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "get_shape_with_axis_expanded(axis: int) -> tuple[int, ...]",
              "source": {
                "line": 264,
                "path": "helia_aot/air/tensor.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L264"
              },
              "summary": ""
            }
          ],
          "name": "AirTensor",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "AirTensor()",
          "source": {
            "line": 30,
            "path": "helia_aot/air/tensor.py",
            "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/air/tensor.py#L30"
          },
          "summary": "AIR tensor representation."
        }
      ]
    }
  ],
  "name": "helia_aot"
}
