-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathbenchmarks.yml
249 lines (233 loc) · 7.29 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
---
common_options: &common_options
data:
throughput:
regexp: 'throughput: *(.*?) samples\/sec'
skip: 2
loss:
reduction_type: "final"
regexp: 'loss: *(\d*\.\d*)'
output:
- [samples/sec, "throughput"]
- [loss, "loss"]
env:
PYTORCH_EXE_DIR: "./pt_cache/"
config_options: &config_options
requirements_path: requirements.txt
validation_options: &validation_options
description: |
VIT validation for 4 IPUs.
finetune_options: &finetune_options
description: |
VIT finetune training for 16 IPUs.
pretrain_options: &pretrain_options
description: |
VIT pretrain training for 16 IPUs.
multihost_options: &multihost_options
description: |
ViT pretrain training for 64 IPUs.
The env variables needed are:
HOSTS - Comma separated list of hosts, usually something like:
`10.1.3.101,10.1.3.10x...`
IPUOF_VIPU_API_HOST - IP of host where VIPU server is running. Usually
`10.1.3.101`.
PARTITION - Name of partition to use, can be found via
`vipu list partitions`. Note that the `--update-partitions` poprun
flag is disabled here, so ensure the partition is reconfigurable
or it has been setup properly for this benchmark
TCP_IF_INCLUDE - Name of subnet, or range of IPs for network interface
on which all hosts are. Usually `enp65s0f0np0` or `10.1.3.0/24`.
pytorch_vit_finetune_gen_pod16:
<<: [*common_options, *finetune_options, *config_options]
description: |
ViT training for 16 IPUs using generated data
cmd: >-
python3 finetune.py
--config b16_imagenet1k
--training-steps 10
--dataset generated
--checkpoint-output-dir ""
--executable-cache-dir PYTORCH_EXE_DIR
pytorch_vit_pretrain_gen_pod16:
<<: [*common_options, *pretrain_options, *config_options]
cmd: >-
python3 pretrain.py
--config b16_in1k_pretrain
--iterations 10
--optimizer-state-offchip false
--byteio true
--dataset generated
--epochs 1
pytorch_vit_lamb_pretrain_gen_pod16:
<<: [*common_options, *pretrain_options, *config_options]
cmd: >-
python3 pretrain.py
--config b16_in1k_pretrain_lamb
--iterations 10
--optimizer-state-offchip false
--byteio true
--dataset generated
--epochs 1
pytorch_vit_lamb_pretrain_gen_pod64:
<<: [*common_options, *multihost_options, *config_options]
cmd: >-
poprun
--vv
--host $HOSTS
--ipus-per-replica=4
--num-ilds=1
--num-replicas=16
--num-instances=8
--reset-partition=no
--vipu-server-host=$IPUOF_VIPU_API_HOST
--vipu-server-timeout=3600
--vipu-partition=$IPUOF_VIPU_API_PARTITION_ID
--executable-cache-path PYTORCH_EXE_DIR
--mpi-global-args="
--mca oob_tcp_if_include $TCP_IF_INCLUDE
--mca btl_tcp_if_include $TCP_IF_INCLUDE"
--mpi-local-args="
-x OPAL_PREFIX
-x LD_LIBRARY_PATH
-x PATH
-x PYTHONPATH
-x CPATH
-x IPUOF_VIPU_API_TIMEOUT
-x POPLAR_LOG_LEVEL
-x POPLAR_SDK_ENABLED
-x POPLAR_ENGINE_OPTIONS"
python3 pretrain.py
--config b16_in1k_pretrain_lamb
--dataset generated
--byteio true
--iterations 100
--gradient-accumulation 512
--epochs 1
--dataloader-workers 32
--enable-rts false
pytorch_vit_lamb_pretrain_real_pod64_conv:
<<: [*common_options, *multihost_options, *config_options]
cmd: >-
poprun
--vv
--host $HOSTS
--ipus-per-replica=4
--num-ilds=1
--num-replicas=16
--num-instances=8
--update-partition=yes
--remove-partition=yes
--reset-partition=no
--vipu-server-host=$IPUOF_VIPU_API_HOST
--vipu-server-timeout=3600
--vipu-partition=$IPUOF_VIPU_API_PARTITION_ID
--vipu-allocation=$VIPU_ALLOCATION_ID
--executable-cache-path PYTORCH_EXE_DIR
--mpi-global-args="
--mca oob_tcp_if_include $TCP_IF_INCLUDE
--mca btl_tcp_if_include $TCP_IF_INCLUDE"
--mpi-local-args="
-x OPAL_PREFIX
-x LD_LIBRARY_PATH
-x PATH
-x PYTHONPATH
-x CPATH
-x IPUOF_VIPU_API_TIMEOUT
-x POPLAR_LOG_LEVEL
-x POPLAR_SDK_ENABLED
-x POPLAR_ENGINE_OPTIONS"
python3 pretrain.py
--config b16_in1k_pretrain_lamb
--dataset-path $DATASETS_DIR/imagenet-raw-dataset
--byteio true
--gradient-accumulation 512
--dataloader-workers 32
--enable-rts false
--mixup true
--wandb true
--wandb-project-name torch-vit
--wandb-run-name pytorch_vit_lamb_pretrain_real_pod64_conv
--checkpoint-output-dir output/ckpt-in1k-pretrain
pytorch_vit_pretrain_validation_real_pod4:
<<: [*validation_options, *config_options]
cmd: >-
poprun
--vv
--ipus-per-replica=4
--num-replicas=1
--num-instances=1
--update-partition=yes
--remove-partition=yes
--reset-partition=no
--vipu-server-host=$VIPU_CLI_API_HOST
--vipu-partition=$IPUOF_VIPU_API_PARTITION_ID
--vipu-allocation=$VIPU_ALLOCATION_ID
--executable-cache-path PYTORCH_EXE_DIR
python validation.py
--config b16_in1k_pretrain_valid
--dataset-path $DATASETS_DIR/imagenet-raw-dataset
--pretrained-checkpoint output/ckpt-in1k-pretrain/step_11399
--wandb true
--wandb-project-name torch-vit
--wandb-run-name pytorch_vit_pretrain_validation_real_pod4
--device-iterations 4
data:
accuracy:
reduction_type: "final"
regexp: 'Valid Accuracy: *(\d+\.\d+)'
output:
- [accuracy, "accuracy"]
env:
PYTORCH_EXE_DIR: "./pt_cache/"
pytorch_vit_finetune_real_pod16_conv:
<<: [*common_options, *finetune_options, *config_options]
cmd: >-
poprun
--vv
--ipus-per-replica=4
--num-replicas=4
--num-instances=1
--reset-partition=no
--vipu-server-host=$VIPU_CLI_API_HOST
--vipu-partition=$IPUOF_VIPU_API_PARTITION_ID
--vipu-allocation=$VIPU_ALLOCATION_ID
--executable-cache-path PYTORCH_EXE_DIR
python3 finetune.py
--config b16_imagenet1k
--dataset-path $DATASETS_DIR/imagenet-raw-dataset
--checkpoint-output-dir ./output/ckpt-in1k-finetune
--wandb true
--wandb-project-name torch-vit
--wandb-run-name pytorch_vit_finetune_real_pod16_conv
--checkpoint-output-dir output/ckpt-in1k-finetune
pytorch_vit_finetune_validation_real_pod4:
<<: [*validation_options, *config_options]
cmd: >-
poprun
--vv
--ipus-per-replica=4
--num-replicas=1
--num-instances=1
--update-partition=yes
--remove-partition=yes
--reset-partition=no
--vipu-server-host=$VIPU_CLI_API_HOST
--vipu-partition=$IPUOF_VIPU_API_PARTITION_ID
--vipu-allocation=$VIPU_ALLOCATION_ID
--executable-cache-path PYTORCH_EXE_DIR
python validation.py
--config b16_imagenet1k_valid
--dataset-path $DATASETS_DIR/imagenet-raw-dataset
--pretrained-checkpoint output/ckpt-in1k-finetune/step_625
--wandb true
--wandb-project-name torch-vit
--wandb-run-name pytorch_vit_finetune_validation_real_pod4
--device-iterations 4
data:
accuracy:
reduction_type: "final"
regexp: 'Valid Accuracy: *(\d+\.\d+)'
output:
- [accuracy, "accuracy"]
env:
PYTORCH_EXE_DIR: "./pt_cache/"