{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# For tips on running notebooks in Google Colab, see\n# https://codelin.vip/beginner/colab\n%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "::: {.meta description=\"An end-to-end example of how to use AOTInductor for Python runtime.\" keywords=\"torch.export, AOTInductor, torch._inductor.aoti_compile_and_package, aot_compile, torch._export.aoti_load_package\"}\n:::\n\n`torch.export` AOTInductor Tutorial for Python runtime (Beta)\n=============================================================\n\n**Author:** Ankith Gunapal, Bin Bao, Angela Yi\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```{=html}\n
torch._inductor.aoti_compile_and_package
andtorch._inductor.aoti_load_package
are in Beta status and are subjectto backwards compatibility breaking changes. This tutorial provides anexample of how to use these APIs for model deployment using Pythonruntime.
This API supports the same available options that torch.compile
has, such as mode
and max_autotune
(for those who want to enableCUDA graphs and leverage Triton based matrix multiplications andconvolutions)