-
Notifications
You must be signed in to change notification settings - Fork 7
358 lines (299 loc) · 15.9 KB
/
test.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
linter:
runs-on: ubuntu-latest
container: ubuntu:22.04
name: Flake8, intellectual property compliance
steps:
- name: Install deps
run:
apt-get update && apt-get install -y git python3-pip && pip3 install flake8 urlextract
- name: Git checkout w/o submodules
uses: actions/checkout@v4
with:
submodules: false
- name: Lint with flake8
run:
python3 -m flake8
- name: Ensure runner files don't do imports in global scope and check if env checking codeblock prepended
run:
python3 -m unittest tests.test_imports
- name: Git checkout w/ submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: True
- name: Check for intellectual property compliance
run: |
git config --global --add safe.directory $(pwd)
python3 -m unittest tests.test_ip
test_x86:
runs-on: ubuntu-latest
container: ubuntu:22.04
name: x86-64 - Ubuntu 22.04 - all frameworks (native)
env:
PYTHONPATH: ./
COCO_IMG_PATH: aio_objdet_dataset
COCO_ANNO_PATH: aio_objdet_dataset/annotations.json
OMP_NUM_THREADS: 4
S3_URL_CRITEO_DATASET: ${{ secrets.S3_URL_CRITEO_DATASET }}
S3_URL_RESNET_50_V15_TF_FP32: ${{ secrets.S3_URL_RESNET_50_V15_TF_FP32 }}
S3_URL_SSD_INCEPTION_V2_TF_FP32: ${{ secrets.S3_URL_SSD_INCEPTION_V2_TF_FP32 }}
S3_URL_ALPACA_PYTORCH_FP32: ${{ secrets.S3_URL_ALPACA_PYTORCH_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Install git
run:
apt-get update && apt-get install -y git
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run:
FORCE_INSTALL=1 bash setup_deb.sh
- name: Unittest
run: |
python3 -m unittest tests.test_pytorch_models
- name: End-user smoke test
run: |
wget https://ampereaimodelzoo.s3.eu-central-1.amazonaws.com/aio_objdet_dataset.tar.gz > /dev/null 2>&1
tar -xf aio_objdet_dataset.tar.gz > /dev/null
wget $S3_URL_RESNET_50_V15_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/resnet_50_v15/run.py -m resnet_50_v15_tf_fp32.pb -p fp32 -f tf --timeout=60
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/mobilenet_v2/run.py -p fp32 -f pytorch --timeout=60
wget https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/object_detection/yolo_v8/run.py -m yolov8n.pt -f pytorch -p fp32 --timeout=60
python3 speech_recognition/whisper/run.py -m small.en
wget $S3_URL_SSD_INCEPTION_V2_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/object_detection/ssd_inception_v2/run.py -m ssd_inception_v2_tf_fp32.pb -p fp32 --timeout=60
wget https://zenodo.org/records/4735647/files/resnet50_v1.onnx > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/resnet_50_v1/run.py -m resnet50_v1.onnx -p fp32 -f ort
wget https://s3.amazonaws.com/onnx-model-zoo/vgg/vgg16/vgg16.tar.gz > /dev/null 2>&1
tar -xf vgg16.tar.gz > /dev/null
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/vgg_16/run.py -m vgg16/vgg16.onnx -p fp32 -f ort
test_arm64:
runs-on: self-hosted
container:
image: ubuntu:22.04
options: --memory=170g
name: ARM64 - Ubuntu 22.04 - all frameworks (native)
env:
PYTHONPATH: ./
COCO_IMG_PATH: aio_objdet_dataset
COCO_ANNO_PATH: aio_objdet_dataset/annotations.json
OMP_NUM_THREADS: 32
S3_URL_CRITEO_DATASET: ${{ secrets.S3_URL_CRITEO_DATASET }}
S3_URL_RESNET_50_V15_TF_FP32: ${{ secrets.S3_URL_RESNET_50_V15_TF_FP32 }}
S3_URL_SSD_INCEPTION_V2_TF_FP32: ${{ secrets.S3_URL_SSD_INCEPTION_V2_TF_FP32 }}
S3_URL_ALPACA_PYTORCH_FP32: ${{ secrets.S3_URL_ALPACA_PYTORCH_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
S3_URL_COVOST2_DATASET: ${{ secrets.S3_URL_COVOST2_DATASET }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Install git
run:
apt-get update && apt-get install -y git
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run:
bash setup_deb.sh
- name: Unittest
run: |
python3 -m unittest tests.test_pytorch_models
- name: End-user smoke test
run: |
wget https://ampereaimodelzoo.s3.eu-central-1.amazonaws.com/aio_objdet_dataset.tar.gz > /dev/null 2>&1
tar -xf aio_objdet_dataset.tar.gz > /dev/null
wget $S3_URL_RESNET_50_V15_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/resnet_50_v15/run.py -m resnet_50_v15_tf_fp32.pb -p fp32 -f tf --timeout=60
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/mobilenet_v2/run.py -p fp32 -f pytorch --timeout=60
wget https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/object_detection/yolo_v8/run.py -m yolov8n.pt -f pytorch -p fp32 --timeout=60
python3 speech_recognition/whisper/run.py -m small.en
wget $S3_URL_SSD_INCEPTION_V2_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/object_detection/ssd_inception_v2/run.py -m ssd_inception_v2_tf_fp32.pb -p fp32 --timeout=60
wget https://zenodo.org/records/4735647/files/resnet50_v1.onnx > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/resnet_50_v1/run.py -m resnet50_v1.onnx -p fp32 -f ort
wget https://s3.amazonaws.com/onnx-model-zoo/vgg/vgg16/vgg16.tar.gz > /dev/null 2>&1
tar -xf vgg16.tar.gz > /dev/null
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/vgg_16/run.py -m vgg16/vgg16.onnx -p fp32 -f ort
test_pytorch_arm64_sh:
if: false
runs-on: self-hosted
container:
image: ubuntu:22.04
options: --memory=170g
name: Ampere Altra - Ampere optimized PyTorch (shell installer)
env:
PYTHONPATH: ./
AIO_NUM_THREADS: 32
AIO_DEBUG_MODE: 0
S3_URL_CRITEO_DATASET: ${{ secrets.S3_URL_CRITEO_DATASET }}
S3_URL_ALPACA_PYTORCH_FP32: ${{ secrets.S3_URL_ALPACA_PYTORCH_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
S3_URL_COVOST2_DATASET: ${{ secrets.S3_URL_COVOST2_DATASET }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Install Ampere optimized PyTorch
run: |
apt-get update && apt-get install -y wget
bash -c "$(wget -qO- https://ampereaidevelopus.s3.amazonaws.com/releases/1.10.0/binaries/install_ampere_pytorch_u22_1_10_0.sh)"
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run:
bash setup_deb.sh
- name: Unittest
run: |
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 -m unittest tests.test_pytorch_models
- name: benchmark.py test
run: |
PYTHONPATH=/__w/ampere_model_library/ampere_model_library python3 benchmark.py --no-interactive --model resnet_50_v1.5
test_pytorch_arm64_docker:
runs-on: self-hosted
container:
image: amperecomputingai/pytorch:latest
options: --memory=170g
name: Ampere Altra - Ampere optimized PyTorch (Docker image)
env:
PYTHONPATH: ./
COCO_IMG_PATH: aio_objdet_dataset
COCO_ANNO_PATH: aio_objdet_dataset/annotations.json
AIO_NUM_THREADS: 32
AIO_DEBUG_MODE: 0
S3_URL_CRITEO_DATASET: ${{ secrets.S3_URL_CRITEO_DATASET }}
S3_URL_ALPACA_PYTORCH_FP32: ${{ secrets.S3_URL_ALPACA_PYTORCH_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
S3_URL_COVOST2_DATASET: ${{ secrets.S3_URL_COVOST2_DATASET }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run: |
bash setup_deb.sh
echo $HF_HUB_TOKEN > ~/.cache/huggingface/token
- name: Unittest
run: |
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 -m unittest tests.test_pytorch_models
- name: benchmark.py test
run: |
{ echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; echo "y"; } | PYTHONPATH=/__w/ampere_model_library/ampere_model_library python3 benchmark.py
# testing second time to ensure that left-over files don't interrupt, etc. - this time no-interactive mode
PYTHONPATH=/__w/ampere_model_library/ampere_model_library python3 benchmark.py --no-interactive --memory 30 --max-threads 24
- name: AML end-user smoke test
run: |
wget https://ampereaimodelzoo.s3.eu-central-1.amazonaws.com/aio_objdet_dataset.tar.gz > /dev/null 2>&1
tar -xf aio_objdet_dataset.tar.gz > /dev/null
wget https://github.com/tloen/alpaca-lora/raw/main/alpaca_data.json > /dev/null 2>&1
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 natural_language_processing/text_generation/llama2/run.py -m meta-llama/Llama-2-7b-chat-hf --dataset_path=alpaca_data.json
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 recommendation/dlrm_torchbench/run.py -p fp32
IGNORE_DATASET_LIMITS=1 AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 computer_vision/classification/resnet_50_v15/run.py -m resnet50 -p fp32 -b 16 -f pytorch
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 speech_recognition/whisper/run.py -m tiny.en
IGNORE_DATASET_LIMITS=1 python3 computer_vision/classification/mobilenet_v2/run.py -p fp32 -f pytorch --timeout=60
wget https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 computer_vision/object_detection/yolo_v8/run.py -m yolov8l.pt -p fp32 -f pytorch
wget -O bert_large_mlperf.pt https://zenodo.org/records/3733896/files/model.pytorch?download=1 > /dev/null 2>&1
AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 natural_language_processing/extractive_question_answering/bert_large/run_mlperf.py -m bert_large_mlperf.pt -p fp32 -f pytorch
test_tensorflow_arm64:
runs-on: self-hosted
container:
image: amperecomputingai/tensorflow:latest
options: --memory=170g
name: Ampere Altra - Ampere optimized TensorFlow (Docker image)
env:
PYTHONPATH: ./
COCO_IMG_PATH: aio_objdet_dataset
COCO_ANNO_PATH: aio_objdet_dataset/annotations.json
AIO_NUM_THREADS: 32
AIO_DEBUG_MODE: 0
S3_URL_RESNET_50_V15_TF_FP32: ${{ secrets.S3_URL_RESNET_50_V15_TF_FP32 }}
S3_URL_SSD_INCEPTION_V2_TF_FP32: ${{ secrets.S3_URL_SSD_INCEPTION_V2_TF_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run: |
bash setup_deb.sh
echo $HF_HUB_TOKEN > ~/.cache/huggingface/token
- name: End-user smoke test
run: |
wget https://ampereaimodelzoo.s3.eu-central-1.amazonaws.com/aio_objdet_dataset.tar.gz > /dev/null 2>&1
tar -xf aio_objdet_dataset.tar.gz > /dev/null
# AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 natural_language_processing/extractive_question_answering/bert_large/run_huggingface.py -m bert-large-cased-whole-word-masking-finetuned-squad
wget $S3_URL_RESNET_50_V15_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 computer_vision/classification/resnet_50_v15/run.py -m resnet_50_v15_tf_fp32.pb -b 32 -p fp32 -f tf --timeout=60
wget $S3_URL_SSD_INCEPTION_V2_TF_FP32 > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 python3 computer_vision/object_detection/ssd_inception_v2/run.py -m ssd_inception_v2_tf_fp32.pb -b 8 -p fp32 --timeout=60
test_onnxrt_arm64:
runs-on: self-hosted
container:
image: amperecomputingai/onnxruntime:latest
options: --memory=170g
name: Ampere Altra - Ampere optimized ONNXRunTime (Docker image)
env:
PYTHONPATH: ./
COCO_IMG_PATH: aio_objdet_dataset
COCO_ANNO_PATH: aio_objdet_dataset/annotations.json
AIO_NUM_THREADS: 32
AIO_DEBUG_MODE: 0
S3_URL_RESNET_50_V15_TF_FP32: ${{ secrets.S3_URL_RESNET_50_V15_TF_FP32 }}
S3_URL_SSD_INCEPTION_V2_TF_FP32: ${{ secrets.S3_URL_SSD_INCEPTION_V2_TF_FP32 }}
S3_URL_IMAGENET_DATASET: ${{ secrets.S3_URL_IMAGENET_DATASET }}
S3_URL_IMAGENET_DATASET_LABELS: ${{ secrets.S3_URL_IMAGENET_DATASET_LABELS }}
S3_URL_COCO_DATASET: ${{ secrets.S3_URL_COCO_DATASET }}
S3_URL_COCO_DATASET_ANNOTATIONS: ${{ secrets.S3_URL_COCO_DATASET_ANNOTATIONS }}
HF_HUB_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
steps:
- name: Git checkout & pull submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Set up AML
run:
bash setup_deb.sh
- name: End-user smoke test
run: |
wget https://ampereaimodelzoo.s3.eu-central-1.amazonaws.com/aio_objdet_dataset.tar.gz > /dev/null 2>&1
tar -xvf aio_objdet_dataset.tar.gz > /dev/null
wget https://zenodo.org/records/4735647/files/resnet50_v1.onnx > /dev/null 2>&1
IGNORE_DATASET_LIMITS=1 AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 computer_vision/classification/resnet_50_v1/run.py -m resnet50_v1.onnx -p fp32 -f ort
wget https://s3.amazonaws.com/onnx-model-zoo/vgg/vgg16/vgg16.tar.gz > /dev/null 2>&1
tar -xf vgg16.tar.gz > /dev/null
IGNORE_DATASET_LIMITS=1 AIO_IMPLICIT_FP16_TRANSFORM_FILTER=".*" python3 computer_vision/classification/vgg_16/run.py -m vgg16/vgg16.onnx -p fp32 -f ort