Skip to content

Commit

Permalink
Generate Python docs from pytorch/pytorch@0553b46
Browse files Browse the repository at this point in the history
  • Loading branch information
pytorchbot committed Feb 23, 2023
1 parent c90ae73 commit 40062f6
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 95 deletions.
Binary file modified docs/2.0/_images/RReLU.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/2.0/_modules/torch/onnx/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,15 @@ <h1>Source code for torch.onnx.utils</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">export_type</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">export_type</span> <span class="o">=</span> <span class="n">_exporter_states</span><span class="o">.</span><span class="n">ExportTypes</span><span class="o">.</span><span class="n">PROTOBUF_FILE</span>

<span class="c1"># Discussed deprecation with Nikita Shulga and Sergii Dymchenko from Meta</span>
<span class="k">if</span> <span class="n">_C_onnx</span><span class="o">.</span><span class="n">_CAFFE2_ATEN_FALLBACK</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="s2">&quot;Caffe2 ONNX exporter is deprecated in version 2.0 and will be &quot;</span>
<span class="s2">&quot;removed in 2.2. Please use PyTorch 2.1 or older for this capability.&quot;</span><span class="p">,</span>
<span class="n">category</span><span class="o">=</span><span class="ne">FutureWarning</span><span class="p">,</span>
<span class="n">stacklevel</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">torch</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">DataParallel</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;torch.nn.DataParallel is not supported by ONNX &quot;</span>
Expand Down
5 changes: 3 additions & 2 deletions docs/2.0/_modules/torch/profiler/profiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ <h1>Source code for torch.profiler.profiler</h1><div class="highlight"><pre>
<span class="sd"> torch.profiler.ProfilerActivity.CUDA,</span>
<span class="sd"> ],</span>

<span class="sd"> # In this example with wait=1, warmup=1, active=2,</span>
<span class="sd"> # In this example with wait=1, warmup=1, active=2, repeat=1,</span>
<span class="sd"> # profiler will skip the first step/iteration,</span>
<span class="sd"> # start warming up on the second, record</span>
<span class="sd"> # the third and the forth iterations,</span>
Expand All @@ -857,7 +857,8 @@ <h1>Source code for torch.profiler.profiler</h1><div class="highlight"><pre>
<span class="sd"> schedule=torch.profiler.schedule(</span>
<span class="sd"> wait=1,</span>
<span class="sd"> warmup=1,</span>
<span class="sd"> active=2),</span>
<span class="sd"> active=2,</span>
<span class="sd"> repeat=1),</span>
<span class="sd"> on_trace_ready=trace_handler</span>
<span class="sd"> # on_trace_ready=torch.profiler.tensorboard_trace_handler(&#39;./log&#39;)</span>
<span class="sd"> # used when outputting for tensorboard</span>
Expand Down
5 changes: 3 additions & 2 deletions docs/2.0/profiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<span class="n">torch</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">ProfilerActivity</span><span class="o">.</span><span class="n">CUDA</span><span class="p">,</span>
<span class="p">],</span>

<span class="c1"># In this example with wait=1, warmup=1, active=2,</span>
<span class="c1"># In this example with wait=1, warmup=1, active=2, repeat=1,</span>
<span class="c1"># profiler will skip the first step/iteration,</span>
<span class="c1"># start warming up on the second, record</span>
<span class="c1"># the third and the forth iterations,</span>
Expand All @@ -672,7 +672,8 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<span class="n">schedule</span><span class="o">=</span><span class="n">torch</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">schedule</span><span class="p">(</span>
<span class="n">wait</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
<span class="n">warmup</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
<span class="n">active</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="n">active</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
<span class="n">repeat</span><span class="o">=</span><span class="mi">1</span><span class="p">),</span>
<span class="n">on_trace_ready</span><span class="o">=</span><span class="n">trace_handler</span>
<span class="c1"># on_trace_ready=torch.profiler.tensorboard_trace_handler(&#39;./log&#39;)</span>
<span class="c1"># used when outputting for tensorboard</span>
Expand Down
Loading

0 comments on commit 40062f6

Please sign in to comment.