---
title: "compile"
sidebar_label: "compile"
description: "Kotlin binding reference: compile."
---

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

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[OnnxModel](index.md)/[compile](compile.md)

# compile

[common]\
fun [compile](compile.md)(options: [CompileOptions](../CompileOptions/index.md) = CompileOptions()): [ModelGraph](../ModelGraph/index.md)

Build the executable form: every node parsed into its runtime operator (an unsupported one fails here, naming it), the weights bound, the shapes resolved per [options](compile.md). The graph comes back as built: optimize it when wanted, then [ModelGraph.finalizeGraph](../ModelGraph/finalizeGraph.md) it to run. The model is unchanged and reusable.