Skip to content

Commit e7f0de9

Browse files
committed
Merge human-made docs from README.md to docs/README.md.in
1 parent a46af89 commit e7f0de9

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

docs/README.md.in

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import torch
2727
import torch_ttnn
2828

2929
# A torch Module
30-
class FooModule(torch.Module):
30+
class FooModule(torch.nn.Module):
3131
...
3232
# Create a module
3333
module = FooModule()
@@ -46,7 +46,7 @@ The tracer dump the information of fx graph such as node's op_name and shape.
4646

4747
For example, you can run this script to parse the information
4848
```
49-
PYTHONPATH=$(pwd) python3 tools/run_torchvision.py --backend torch_stat --backward --profile
49+
PYTHONPATH=$(pwd) python3 tools/stat_models.py --trace_orig --backward --profile
5050
ls stat/raw
5151
```
5252

@@ -74,10 +74,35 @@ The `*_total_*_size_dist/` statistics the `op_type`'s input/output_size distribu
7474

7575
[The `profile/` is the tools provided by pytorch](https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html), you can open it by the url: chrome://tracing
7676

77+
78+
# For developers
79+
80+
## Install torch-ttnn with editable mode
81+
82+
During development, you may want to use the torch-ttnn package for testing.
83+
In order to do that, you can install the torch-ttnn package in "editable"
84+
mode with
85+
86+
```shell
87+
pip install -e .
88+
```
89+
90+
Now, you can utilize `torch_ttnn` in your Python code. Any modifications you make to the `torch_ttnn` package will take effect immediately, eliminating the need for constant reinstallation via pip.
91+
92+
## Build wheel file
93+
94+
For developers want to deploy the wheel, you can build the wheel file with
95+
96+
```shell
97+
python -m build
98+
```
99+
100+
Then you can upload the `.whl` file to the PyPI (Python Package Index).
101+
77102
## Run transformer models
78103
To run transformer model with ttnn backend, run:
79104
```
80-
PYTHONPATH=${{TT_METAL_HOME}}:$(pwd) python3 tools/run_transformers.py --model "phiyodr/bert-large-finetuned-squad2" --backend torch_ttnn
105+
PYTHONPATH=${TT_METAL_HOME}:$(pwd) python3 tools/run_transformers.py --model "phiyodr/bert-large-finetuned-squad2" --backend torch_ttnn
81106
```
82107

83108
You can also substitute the backend with `torch_stat` to run a reference comparison.

0 commit comments

Comments
 (0)