span class="n">half</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_bs12</span> <span class="o">=</span> <span class="n">optimized_model</span><span class="p">(</span><span class="n">inputs_bs12</span><span class="p">)</span>

<span class="c1"># The following code illustrates the workflow using ir=dynamo (which uses torch.export APIs under the hood)</span>
<spa