Facilities built around PyTorch DTensor
Project description
Facilities for PyTorch DTensor
Installation
Install the project using the following command:
pip install -e .
Visualize Sharding
Since transitioning from the PyTorch Distributed team at Meta to working on Apple Foundation Models at Apple, I've been utilizing AXLearn, which is built on top of JAX.
To understand JAX's distributed arrays and how sharding across a device mesh could implement various parallelism strategies, I've used jax.debug.visualize_array_sharding. In this LinkedIn post, co-authored with Wanchao Liang, we demonstrate the benefits of visualizing sharding.
It's encouraging to see my former team releasing PyTorch's DTensor and showcasing its value through the development of FSDP2 and TorchTitan. DTensor also includes a sharding visualization feature that utilizes tabulate to produce a basic visual representation.
This project introduces an enhanced visualization for DTensor's sharding, inspired by JAX's approach. Run the following command to see how it works.
OMP_NUM_THREADS=1 torchrun --nproc_per_node=4 dtensor/visualize_example.py
This will display a list of sharding/mesh combinations. For each combination, visualizations generated by both the original and the new methods will be presented.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dtensor-0.0.1.tar.gz.
File metadata
- Download URL: dtensor-0.0.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef095b6e6d3bac56ddab72fdc31d6f0bdc9343f78aa94a1f11ec335f09fe22b
|
|
| MD5 |
71644352cb47fb7909165f851bfd6cdf
|
|
| BLAKE2b-256 |
6f26b27cfb2100d05ded6c53c7ec815d0e89cb5e62c8345795e59b1fed4bf9b5
|
File details
Details for the file dtensor-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dtensor-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e038fdf8a4cb1870aef09fcd532e8cfb5b053c091cd816304b9cc5ee3aebc960
|
|
| MD5 |
e160e4ff231a7ecbfd17b0f0925c30d1
|
|
| BLAKE2b-256 |
f46b55d7a24136232f71136144838859fe6ecd515937f85d00a6435a19019f2b
|