Skip to content

Commit d506f7c

Browse files
haifeng-jinpgmoka
authored andcommitted
Add description of prerequisites for running benchmarks (#9230)
Co-authored-by: Haifeng Jin <[email protected]>
1 parent 9471a2a commit d506f7c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

benchmarks/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ The two main benchmarking scripts are
44
- `experiment_runner.py` to run benchmark experiments, and
55
- `result_analyzer.py` to aggregate the benchmark result in CSV form.
66

7+
## Prerequisites
8+
9+
Follow the [contributing
10+
guide](https://github.com/pytorch/xla/blob/master/CONTRIBUTING.md) to set up
11+
the repo for development. Using the devcontainer is recommended.
12+
13+
Install the required libraries by the models. Depending on the specific
14+
models, you may need to install `torchvision`, `torchaudio`, `torchtext`.
15+
16+
Follow [this guide](https://pytorch.org/get-started/locally/) to install the
17+
`torchvision` and `torchaudio` version you need. Use the following command to
18+
install `torchtext`.
19+
20+
```shell
21+
pip install torchtext
22+
```
23+
24+
The following LibGL library is
25+
required by the Llava model.
26+
27+
```shell
28+
apt install libgl1-mesa-glx
29+
```
30+
31+
For the scripts to find the models to benchmark, clone the
32+
[`pytorch/benchmark`](https://github.com/pytorch/benchmark) repo into your
33+
workspace directory, which also contains the `pytorch` and the `vision` repo.
34+
35+
```shell
36+
cd $WORKSPACE # cd to the workspace directory containing `pytorch` and `vision`
37+
git clone [email protected]:pytorch/benchmark.git
38+
```
39+
740

841
## Patching mismatched batch sizes
942

0 commit comments

Comments
 (0)