Skip to content

Commit be75403

Browse files
authored
Small change (#1597)
1 parent cc51b28 commit be75403

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/2.2/amp.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ <h1>Automatic Mixed Precision package - torch.amp<a class="headerlink" href="#au
630630
<p><code class="docutils literal notranslate"><span class="pre">autocast(enabled=False)</span></code> subregions can be nested in autocast-enabled regions.
631631
Locally disabling autocast can be useful, for example, if you want to force a subregion
632632
to run in a particular <code class="docutils literal notranslate"><span class="pre">dtype</span></code>. Disabling autocast gives you explicit control over
633-
the execution type. In the subregion, inputs from the surrounding region
633+
the execution type. In the subregion, inputs from the surrounding region
634634
should be cast to <code class="docutils literal notranslate"><span class="pre">dtype</span></code> before use:</p>
635635
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Creates some tensors in default dtype (here assumed to be float32)</span>
636636
<span class="n">a_float32</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">rand</span><span class="p">((</span><span class="mi">8</span><span class="p">,</span> <span class="mi">8</span><span class="p">),</span> <span class="n">device</span><span class="o">=</span><span class="s2">&quot;cuda&quot;</span><span class="p">)</span>
@@ -1734,4 +1734,4 @@ <h2>Resources</h2>
17341734
})
17351735
</script>
17361736
</body>
1737-
</html>
1737+
</html>

0 commit comments

Comments
 (0)