</span><span class="n">torch_executed_ops</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">with</span> <span class="n">torch</span><span class="o">.</span><span class="n">no_grad</span><span class="p">():</span>
    <span class="n">outputs_bs8</span> <span class="o">=</span> <span class="n">optimized_model</span><span class="p">(</span><span class="n">inputs_bs8</span><span class="p">)</span>

<span class="c1"># No recompilation happens for batch size = 12</span>
<span class="n">inpu