Skip to content

Commit

Permalink
Update images to support dark mode (#7195)
Browse files Browse the repository at this point in the history
  • Loading branch information
loganthomas authored Jun 5, 2024
1 parent 73346d7 commit cdb4aec
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Binary file modified docs/assets/IRgraph_markstep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/IRgraph_no_markstep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/pytorchXLA_flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/spmd_debug_1_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/spmd_debug_2_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions docs/spmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/spmd_debug_1.png">
<img alt="visualize_tensor_sharding example on TPU v4-8(single-host)" src="assets/spmd_debug_1_light.png">
</picture>

- Code snippet used `visualize_sharding` and visualization result:

Expand All @@ -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")
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/spmd_debug_2.png">
<img alt="visualize_sharding example on TPU v4-8(single-host)" src="assets/spmd_debug_2_light.png">
</picture>

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`.

Expand Down

0 comments on commit cdb4aec

Please sign in to comment.