Skip to content

Commit

Permalink
deploy: 3785995
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomDefaultUser committed Jan 3, 2024
1 parent b20b6d8 commit 825c0bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _modules/mala/common/parameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ <h1>Source code for mala.common.parameters</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">use_mixed_precision</span> <span class="o">=</span> <span class="kc">False</span>
<span class="bp">self</span><span class="o">.</span><span class="n">use_graphs</span> <span class="o">=</span> <span class="kc">False</span>
<span class="bp">self</span><span class="o">.</span><span class="n">training_report_frequency</span> <span class="o">=</span> <span class="mi">1000</span>
<span class="bp">self</span><span class="o">.</span><span class="n">profiler_range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1000</span><span class="p">,</span> <span class="mi">2000</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">profiler_range</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1">#[1000, 2000]</span>

<span class="k">def</span> <span class="nf">_update_horovod</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">new_horovod</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">ParametersRunning</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">_update_horovod</span><span class="p">(</span><span class="n">new_horovod</span><span class="p">)</span>
Expand Down
9 changes: 5 additions & 4 deletions _modules/mala/network/trainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,11 @@ <h1>Source code for mala.network.trainer</h1><div class="highlight"><pre>
<span class="k">for</span> <span class="n">loader</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">training_data_loaders</span><span class="p">:</span>
<span class="k">for</span> <span class="p">(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">outputs</span><span class="p">)</span> <span class="ow">in</span> <span class="n">loader</span><span class="p">:</span>

<span class="k">if</span> <span class="n">batchid</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">profiler_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
<span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">if</span> <span class="n">batchid</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">profiler_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
<span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">profiler_range</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">batchid</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">profiler_range</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
<span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">if</span> <span class="n">batchid</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">profiler_range</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
<span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">profiler</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>

<span class="n">torch</span><span class="o">.</span><span class="n">cuda</span><span class="o">.</span><span class="n">nvtx</span><span class="o">.</span><span class="n">range_push</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;step </span><span class="si">{</span><span class="n">batchid</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

Expand Down
Binary file modified objects.inv
Binary file not shown.

0 comments on commit 825c0bd

Please sign in to comment.