{
  "$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": "CtxBufUsage",
      "path": "helia_aot.aot.operators.operator.CtxBufUsage",
      "submodules": [],
      "summary": "",
      "symbols": [
        {
          "description": "How an operator's lowering uses ``cmsis_nn_context::buf``.\n\nEvery registered operator declares one of these via\n:attr:`AotOperator.CTX_BUF_USAGE`. The declaration is the machine-checkable\nhalf of a rule that used to live only in reviewers' heads: *a kernel that\ndereferences ``ctx->buf`` must never be handed a context whose ``buf`` is\n``NULL``*. Templates set ``ctx.buf = NULL`` whenever the operator allocated\nno scratch tensor, so an operator whose scratch sizing returns 0 for a\ndtype/target combination that still reaches a buf-reading kernel emits a\nguaranteed NULL dereference -- either a silent memory-corrupting write (for\nthe kernels with no NULL guard) or a runtime ``ARM_CMSIS_NN_ARG_ERROR`` that\nleaves the output stale. See\n:meth:`AotOperator._assert_ctx_buf_backed` for why neither is caught before\nsilicon without a resolve-time check.",
          "examples": [],
          "id": "helia_aot.aot.operators.operator.CtxBufUsage",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "The template passes no ``cmsis_nn_context`` to any kernel --\neither it calls no CMSIS-NN kernel at all, or every kernel it\ndispatches takes no context argument.",
              "examples": [],
              "id": "helia_aot.aot.operators.operator.CtxBufUsage.NO_CTX",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "NO_CTX",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "NO_CTX = 'no_ctx'",
              "source": {
                "line": 92,
                "path": "helia_aot/aot/operators/operator.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/aot/operators/operator.py#L92"
              },
              "summary": ""
            },
            {
              "description": "A context is passed, but no dispatchable kernel dereferences\n``buf`` (typically an explicit ``(void)ctx;`` upstream).",
              "examples": [],
              "id": "helia_aot.aot.operators.operator.CtxBufUsage.IGNORED",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "IGNORED",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "IGNORED = 'ignored'",
              "source": {
                "line": 93,
                "path": "helia_aot/aot/operators/operator.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/aot/operators/operator.py#L93"
              },
              "summary": ""
            },
            {
              "description": "At least one dispatchable kernel dereferences ``ctx->buf``\nfor every configuration the operator supports.",
              "examples": [],
              "id": "helia_aot.aot.operators.operator.CtxBufUsage.REQUIRED",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "REQUIRED",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "REQUIRED = 'required'",
              "source": {
                "line": 94,
                "path": "helia_aot/aot/operators/operator.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/aot/operators/operator.py#L94"
              },
              "summary": ""
            },
            {
              "description": "Whether ``buf`` is dereferenced depends on dtype, target\ncapability, or operator options. Subclasses declaring this MUST\noverride :meth:`AotOperator.ctx_buf_required`.",
              "examples": [],
              "id": "helia_aot.aot.operators.operator.CtxBufUsage.CONDITIONAL",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "CONDITIONAL",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "CONDITIONAL = 'conditional'",
              "source": {
                "line": 95,
                "path": "helia_aot/aot/operators/operator.py",
                "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/aot/operators/operator.py#L95"
              },
              "summary": ""
            }
          ],
          "name": "CtxBufUsage",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "CtxBufUsage()",
          "source": {
            "line": 63,
            "path": "helia_aot/aot/operators/operator.py",
            "url": "https://github.com/AmbiqAI/helia-aot/blob/cf2246a7ad439fa38d57462118e7840e5497a685/helia_aot/aot/operators/operator.py#L63"
          },
          "summary": "How an operator's lowering uses cmsisnncontext::buf."
        }
      ]
    }
  ],
  "name": "helia_aot"
}
