Skip to content

Commit

Permalink
Update doc from commit 3efe1eb
Browse files Browse the repository at this point in the history
  • Loading branch information
torchxlabot2 committed Oct 30, 2024
1 parent 9d139c8 commit 5f3cba2
Show file tree
Hide file tree
Showing 47 changed files with 50 additions and 53 deletions.
2 changes: 1 addition & 1 deletion master/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
9 changes: 4 additions & 5 deletions master/_modules/torch_xla/core/xla_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down Expand Up @@ -1722,10 +1722,9 @@ <h1>Source code for torch_xla.core.xla_model</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">sharding</span> <span class="ow">and</span> <span class="n">tensor</span><span class="o">.</span><span class="n">dim</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="p">(</span><span class="n">tensor</span><span class="o">.</span><span class="n">size</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="o">%</span>
<span class="n">local_runtime_device_count</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
<span class="s2">&quot;When minibatch is configured, batch dimension of the tensor &quot;</span> <span class="o">+</span>
<span class="s2">&quot;must be divisible by local runtime device count.input data shape &quot;</span>
<span class="o">+</span>
<span class="sa">f</span><span class="s2">&quot;=</span><span class="si">{</span><span class="n">tensor</span><span class="o">.</span><span class="n">size</span><span class="p">()</span><span class="si">}</span><span class="s2">, local_runtime_device_count = </span><span class="si">{</span><span class="n">local_runtime_device_count</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="s2">&quot;When minibatch is configured, the per-host batch size must be divisible &quot;</span>
<span class="o">+</span> <span class="s2">&quot;by local runtime device count. Per host input data shape &quot;</span> <span class="o">+</span>
<span class="sa">f</span><span class="s2">&quot;= </span><span class="si">{</span><span class="n">tensor</span><span class="o">.</span><span class="n">size</span><span class="p">()</span><span class="si">}</span><span class="s2">, local_runtime_device_count = </span><span class="si">{</span><span class="n">local_runtime_device_count</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span>

<span class="n">xtensors</span> <span class="o">=</span> <span class="n">torch_xla</span><span class="o">.</span><span class="n">_XLAC</span><span class="o">.</span><span class="n">_xla_tensors_from_aten</span><span class="p">(</span><span class="n">tensors</span><span class="p">,</span> <span class="n">devices</span><span class="p">,</span>
Expand Down
2 changes: 1 addition & 1 deletion master/_modules/torch_xla/debug/metrics.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/_modules/torch_xla/distributed/parallel_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/_modules/torch_xla/experimental/eager.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/_modules/torch_xla/runtime.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/_modules/torch_xla/torch_xla.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
3 changes: 1 addition & 2 deletions master/_sources/perf/ddp.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ import torch_xla.runtime as xr
import torch_xla.distributed.xla_backend

def setup(rank, world_size):
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '12355'
os.environ['PJRT_DEVICE'] = 'TPU'

# initialize the xla process group
dist.init_process_group("xla", rank=rank, world_size=world_size)
Expand Down
2 changes: 1 addition & 1 deletion master/accelerators/gpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/accelerators/tpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/contribute/bazel.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/contribute/codegen_migration.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/contribute/configure-environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/contribute/op_lowering.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/contribute/plugins.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/features/distop.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/features/pallas.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/features/stablehlo.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/features/triton.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/api-guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/dynamic_shape.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/eager.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/pjrt.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/pytorch-on-xla-devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/troubleshoot.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/learn/xla-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/notes/source_of_recompilation.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
Binary file modified master/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion master/perf/amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
5 changes: 2 additions & 3 deletions master/perf/ddp.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down Expand Up @@ -486,8 +486,7 @@ <h2>How to use DistributedDataParallel<a class="headerlink" href="#how-to-use-di
<span class="kn">import</span> <span class="nn">torch_xla.distributed.xla_backend</span>

<span class="k">def</span> <span class="nf">setup</span><span class="p">(</span><span class="n">rank</span><span class="p">,</span> <span class="n">world_size</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">&#39;MASTER_ADDR&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;localhost&#39;</span>
<span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">&#39;MASTER_PORT&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;12355&#39;</span>
<span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">&#39;PJRT_DEVICE&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;TPU&#39;</span>

<span class="c1"># initialize the xla process group</span>
<span class="n">dist</span><span class="o">.</span><span class="n">init_process_group</span><span class="p">(</span><span class="s2">&quot;xla&quot;</span><span class="p">,</span> <span class="n">rank</span><span class="o">=</span><span class="n">rank</span><span class="p">,</span> <span class="n">world_size</span><span class="o">=</span><span class="n">world_size</span><span class="p">)</span>
Expand Down
2 changes: 1 addition & 1 deletion master/perf/dynamo.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/fori_loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/fsdp.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/fsdpv2.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/quantized_ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/recompilation.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/spmd_advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
2 changes: 1 addition & 1 deletion master/perf/spmd_basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@


<div class="version">
master (2.6.0+git89e47b3 )
master (2.6.0+git3efe1eb )
</div>


Expand Down
Loading

0 comments on commit 5f3cba2

Please sign in to comment.