diff --git a/docs/assets/IRgraph_markstep.png b/docs/assets/IRgraph_markstep.png index a99895b47f5..2a9ad5ce54f 100644 Binary files a/docs/assets/IRgraph_markstep.png and b/docs/assets/IRgraph_markstep.png differ diff --git a/docs/assets/IRgraph_no_markstep.png b/docs/assets/IRgraph_no_markstep.png index 74f7b41cee4..282d3907104 100644 Binary files a/docs/assets/IRgraph_no_markstep.png and b/docs/assets/IRgraph_no_markstep.png differ diff --git a/docs/assets/pytorchXLA_flow.svg b/docs/assets/pytorchXLA_flow.svg index 0dd3bc96028..3812141ce48 100644 --- a/docs/assets/pytorchXLA_flow.svg +++ b/docs/assets/pytorchXLA_flow.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/docs/assets/spmd_debug_1_light.png b/docs/assets/spmd_debug_1_light.png new file mode 100644 index 00000000000..9f2f060b2d0 Binary files /dev/null and b/docs/assets/spmd_debug_1_light.png differ diff --git a/docs/assets/spmd_debug_2_light.png b/docs/assets/spmd_debug_2_light.png new file mode 100644 index 00000000000..87deb04ce43 Binary files /dev/null and b/docs/assets/spmd_debug_2_light.png differ diff --git a/docs/spmd.md b/docs/spmd.md index 00e384e496c..ccd79ef1d35 100644 --- a/docs/spmd.md +++ b/docs/spmd.md @@ -501,7 +501,10 @@ xs.mark_sharding(t, mesh, ('x', 'y')) from torch_xla.distributed.spmd.debugging import visualize_tensor_sharding generated_table = visualize_tensor_sharding(t, use_color=False) ``` -![alt_text](assets/spmd_debug_1.png "visualize_tensor_sharding example on TPU v4-8(single-host)") + + + visualize_tensor_sharding example on TPU v4-8(single-host) + - Code snippet used `visualize_sharding` and visualization result: @@ -510,7 +513,10 @@ from torch_xla.distributed.spmd.debugging import visualize_sharding sharding = '{devices=[2,2]0,1,2,3}' generated_table = visualize_sharding(sharding, use_color=False) ``` -![alt_text](assets/spmd_debug_2.png "visualize_sharding example on TPU v4-8(single-host") + + + visualize_sharding example on TPU v4-8(single-host) + You could use these examples on TPU/GPU/CPU single-host and modify it to run on multi-host. And you could modify it to sharding-style `tiled`, `partial_replication` and `replicated`.