---
title: "clika_runtime.onnx"
sidebar_label: "clika_runtime.onnx"
description: "The clika_runtime.onnx module, introspected from the installed wheel."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

Load an ONNX model as a callable in one call.

::

    import clika_runtime as crt

    model = crt.onnx.load("mlp.onnx", device="cuda:0")
    outputs = model(X=crt.tensor(x))       # dict, output name -> Tensor
    y = outputs["Y"]

:func:`load` opens the file, compiles it, optimizes and finalizes the
graph, and returns a :class:`Model`: call it with the inputs by name (or
positionally in ``input_names`` order) and read the outputs by name. The
compiled form is ``model.graph``. The editable form (an
:class:`~clika_runtime.io.OnnxModel`) is released once the graph is built, and
the parsed model's share of memory goes with it, which on a small board is
the difference between a model that fits and one that does not, unless
``keep_editable=True`` keeps it as ``model.onnx`` for :meth:`Model.recompile`
after an edit.

| Name | Kind |
| --- | --- |
| [`Model`](./Model.md) | class |
| [functions](./functions.md) | module functions |