mpilation-with-torch-tensorrt-compile" title="Permalink to this heading">¶</a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Build and compile the model with torch.compile, using Torch-TensorRT backend</span>
<span class="n">optimized_model</span> <span class="o">=</span> <span class="n">torch_tensorrt</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span>
    <span class="n">model</span><span class="p">,</span>
    