forked from mlcommons/ck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_cm.yaml
792 lines (728 loc) · 17.5 KB
/
_cm.yaml
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# Identification of this CM script
alias: app-mlperf-inference
uid: d775cac873ee4231
automation_alias: script
automation_uid: 5b4e0237da074764
category: "Modular MLPerf benchmarks"
category_sort: 20000
developers: "[Arjun Suresh](https://www.linkedin.com/in/arjunsuresh), [Thomas Zhu](https://www.linkedin.com/in/hanwen-zhu-483614189), [Grigori Fursin](https://cKnowledge.org/gfursin)"
# User-friendly tags to find this CM script
tags:
- app
- vision
- language
- mlcommons
- mlperf
- inference
- generic
# Default environment
default_env:
CM_MLPERF_LOADGEN_MODE: accuracy
CM_MLPERF_LOADGEN_SCENARIO: Offline
CM_OUTPUT_FOLDER_NAME: test_results
CM_MLPERF_RUN_STYLE: test
CM_TEST_QUERY_COUNT: '10'
CM_MLPERF_QUANTIZATION: off
# Map script inputs to environment variables
input_mapping:
count: CM_MLPERF_LOADGEN_QUERY_COUNT
docker: CM_RUN_DOCKER_CONTAINER
hw_name: CM_HW_NAME
imagenet_path: IMAGENET_PATH
max_batchsize: CM_MLPERF_LOADGEN_MAX_BATCHSIZE
mode: CM_MLPERF_LOADGEN_MODE
num_threads: CM_NUM_THREADS
output_dir: OUTPUT_BASE_DIR
power: CM_MLPERF_POWER
power_server: CM_MLPERF_POWER_SERVER_ADDRESS
ntp_server: CM_MLPERF_POWER_NTP_SERVER
max_amps: CM_MLPERF_POWER_MAX_AMPS
max_volts: CM_MLPERF_POWER_MAX_VOLTS
regenerate_files: CM_REGENERATE_MEASURE_FILES
rerun: CM_RERUN
scenario: CM_MLPERF_LOADGEN_SCENARIO
test_query_count: CM_TEST_QUERY_COUNT
clean: CM_MLPERF_CLEAN_SUBMISSION_DIR
target_qps: CM_MLPERF_LOADGEN_TARGET_QPS
target_latency: CM_MLPERF_LOADGEN_TARGET_LATENCY
offline_target_qps: CM_MLPERF_LOADGEN_OFFLINE_TARGET_QPS
server_target_qps: CM_MLPERF_LOADGEN_SERVER_TARGET_QPS
singlestream_target_latency: CM_MLPERF_LOADGEN_SINGLESTREAM_TARGET_LATENCY
multistream_target_latency: CM_MLPERF_LOADGEN_MULTISTREAM_TARGET_LATENCY
readme: CM_MLPERF_README
debug: CM_DEBUG_SCRIPT_BENCHMARK_PROGRAM
# Duplicate CM environment variables to the ones used in native apps
env_key_mappings:
CM_HOST_: HOST_
CM_ML_: ML_
CM_MLPERF_TVM: MLPERF_TVM
# Env keys which are exposed to higher level scripts
new_env_keys:
- CM_MLPERF_*
# Dependencies on other CM scripts
deps:
# Detect host OS features
- tags: detect,os
# Install system dependencies on a given host
- tags: get,sys-utils-cm
# Detect/install python
- tags: get,python
names:
- python
- python3
########################################################################
# Install MLPerf inference dependencies
# Download MLPerf inference source
- tags: get,mlcommons,inference,src
names:
- inference-src
# Order of variations for documentation
variation_groups_order:
- implementation
- backend
- device
- model
- precision
- execution-mode
- reproducibility
# Variations to customize dependencies
variations:
# Implementation (cpp, reference/python, nvidia, tflite-cpp)
cpp:
group:
implementation
add_deps_recursive:
imagenet-accuracy-script:
tags: _int64
env:
CM_MLPERF_CPP: 'yes'
CM_MLPERF_IMPLEMENTATION: cpp
CM_IMAGENET_ACCURACY_DTYPE: float32
CM_OPENIMAGES_ACCURACY_DTYPE: float32
posthook_deps:
- names:
- cpp-mlperf-inference
- mlperf-inference-implementation
tags: app,mlperf,cpp,inference
skip_if_env:
CM_SKIP_RUN:
- yes
tflite-cpp:
default_variations:
backend: tflite
device: cpu
group:
implementation
add_deps_recursive:
imagenet-accuracy-script:
tags: _float32
env:
CM_MLPERF_TFLITE_CPP: 'yes'
CM_MLPERF_CPP: 'yes'
CM_MLPERF_IMPLEMENTATION: tflite-cpp
CM_IMAGENET_ACCURACY_DTYPE: float32
posthook_deps:
- names:
- tflite-cpp-mlperf-inference
- mlperf-inference-implementation
tags: app,mlperf,tflite-cpp,inference
skip_if_env:
CM_SKIP_RUN:
- yes
reference:
group:
implementation
default:
true
add_deps_recursive:
imagenet-accuracy-script:
tags: _float32
squad-accuracy-script:
tags: _float32
librispeech-accuracy-script:
tags: _int32
env:
CM_MLPERF_PYTHON: 'yes'
CM_MLPERF_IMPLEMENTATION: reference
CM_SQUAD_ACCURACY_DTYPE: float32
CM_IMAGENET_ACCURACY_DTYPE: float32
CM_OPENIMAGES_ACCURACY_DTYPE: float32
CM_LIBRISPEECH_ACCURACY_DTYPE: float32
posthook_deps:
- names:
- python-reference-mlperf-inference
- mlperf-inference-implementation
tags: app,mlperf,reference,inference
skip_if_env:
CM_SKIP_RUN:
- yes
python:
alias: reference
nvidia:
default_variations:
backend: tensorrt
device: cuda
group:
implementation
add_deps_recursive:
imagenet-accuracy-script:
tags: _int32
squad-accuracy-script:
tags: _float16
python:
version-min: 3.8.0
env:
CM_MLPERF_IMPLEMENTATION: nvidia
CM_SQUAD_ACCURACY_DTYPE: float16
CM_IMAGENET_ACCURACY_DTYPE: int32
deps:
## Nvidia common code
- tags: get,mlperf,inference,nvidia,common-code
- tags: get,mlperf,training,src
- tags: get,generic-python-lib,_nvidia-pyindex
- tags: get,generic-python-lib,_nvidia-tensorrt
- tags: get,generic-python-lib,_numpy
- tags: get,generic-python-lib,_pycuda
- tags: get,generic-python-lib,_mlperf_logging
- tags: get,generic-python-lib,_onnx
nvidia-original:
default_variations:
backend: tensorrt
device: cuda
group:
implementation
add_deps_recursive:
imagenet-accuracy-script:
tags: _int32
squad-accuracy-script:
tags: _float16
librispeech-accuracy-script:
tags: _int8
env:
CM_MLPERF_IMPLEMENTATION: nvidia-original
CM_SQUAD_ACCURACY_DTYPE: float16
CM_IMAGENET_ACCURACY_DTYPE: int32
CM_LIBRISPEECH_ACCURACY_DTYPE: int8
posthook_deps:
- names:
- nvidia-original-mlperf-inference
- nvidia-harness
- mlperf-inference-implementation
tags: reproduce,mlperf,nvidia,inference
skip_if_env:
CM_SKIP_RUN:
- yes
resnet50:
group:
model
default:
true
env:
CM_MODEL:
resnet50
deps:
- tags: get,dataset-aux,imagenet-aux
add_deps_recursive:
mlperf-inference-implementation:
tags: _resnet50
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- imagenet-accuracy-script
tags: run,accuracy,mlperf,_imagenet
retinanet:
group:
model
env:
CM_MODEL:
retinanet
add_deps_recursive:
mlperf-inference-implementation:
tags: _retinanet
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- openimages-accuracy-script
tags: run,accuracy,mlperf,_openimages
3d-unet-99:
group:
model
base:
- 3d-unet_
env:
CM_MODEL:
3d-unet-99
add_deps_recursive:
mlperf-inference-implementation:
tags: _3d-unet-99
3d-unet-99.9:
group:
model
base:
- 3d-unet_
env:
CM_MODEL:
3d-unet-99.9
add_deps_recursive:
mlperf-inference-implementation:
tags: _3d-unet-99.9
3d-unet_:
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- 3d-unet-accuracy-script
tags: run,accuracy,mlperf,_kits19,_int8
rnnt:
group:
model
env:
CM_MODEL:
rnnt
add_deps_recursive:
mlperf-inference-implementation:
tags: _rnnt
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- librispeech-accuracy-script
tags: run,accuracy,mlperf,_librispeech
gptj:
group:
model
env:
CM_MODEL:
gptj
add_deps_recursive:
mlperf-inference-implementation:
tags: _gptj
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- cnndm-accuracy-script
- mlperf-accuracy-script
tags: run,accuracy,mlperf,_cnndm
bert_:
deps:
- skip_if_env:
CM_DATASET_SQUAD_VAL_PATH: "on"
tags: get,dataset,squad,language-processing
- skip_if_env:
CM_ML_MODEL_BERT_VOCAB_FILE_WITH_PATH": "on"
tags: get,dataset-aux,squad-vocab
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- squad-accuracy-script
- mlperf-accuracy-script
tags: run,accuracy,mlperf,_squad
add_deps_recursive:
inference-src:
tags: _deeplearningexamples
bert-99:
group:
model
base:
- bert_
env:
CM_MODEL:
bert-99
add_deps_recursive:
mlperf-inference-implementation:
tags: _bert-99
bert-99.9:
group:
model
base:
- bert_
env:
CM_MODEL:
bert-99.9
add_deps_recursive:
mlperf-inference-implementation:
tags: _bert-99.9
dlrm_:
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- terabyte-accuracy-script
- mlperf-accuracy-script
tags: run,accuracy,mlperf,_terabyte,_float32
dlrm-99:
group:
model
base:
- dlrm_
env:
CM_MODEL:
dlrm-99
add_deps_recursive:
mlperf-inference-implementation:
tags: _dlrm-99
dlrm-99.9:
group:
model
base:
- dlrm_
env:
CM_MODEL:
dlrm-99.9
add_deps_recursive:
mlperf-inference-implementation:
tags: _dlrm-99.9
mobilenet:
group:
model
env:
CM_MODEL:
mobilenet
add_deps_recursive:
mlperf-inference-implementation:
tags: _mobilenet
deps:
- tags: get,dataset-aux,imagenet-aux
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- imagenet-accuracy-script
tags: run,accuracy,mlperf,_imagenet
efficientnet:
group:
model
env:
CM_MODEL:
efficientnet
add_deps_recursive:
mlperf-inference-implementation:
tags: _efficientnet
deps:
- tags: get,dataset-aux,imagenet-aux
post_deps:
- enable_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
- all
CM_MLPERF_ACCURACY_RESULTS_DIR:
- 'on'
names:
- mlperf-accuracy-script
- imagenet-accuracy-script
tags: run,accuracy,mlperf,_imagenet
onnxruntime:
group: backend
default: true
env:
CM_MLPERF_BACKEND:
onnxruntime
add_deps_recursive:
mlperf-inference-implementation:
tags: _onnxruntime
tensorrt:
group: backend
env:
CM_MLPERF_BACKEND:
tensorrt
add_deps_recursive:
mlperf-inference-implementation:
tags: _tensorrt
tf:
group: backend
env:
CM_MLPERF_BACKEND:
tf
add_deps_recursive:
mlperf-inference-implementation:
tags: _tf
pytorch:
group: backend
env:
CM_MLPERF_BACKEND:
pytorch
add_deps_recursive:
mlperf-inference-implementation:
tags: _pytorch
deepsparse:
group: backend
default_variations:
precision: int8
env:
CM_MLPERF_BACKEND:
deepsparse
add_deps_recursive:
mlperf-inference-implementation:
tags: _deepsparse
tflite:
group: backend
env:
CM_MLPERF_BACKEND: tflite
add_deps_recursive:
mlperf-inference-implementation:
tags: _tflite
tvm-onnx:
group: backend
base:
- batch_size.32
env:
CM_MLPERF_BACKEND: tvm-onnx
add_deps_recursive:
mlperf-inference-implementation:
tags: _tvm-onnx
tvm-pytorch:
group: backend
env:
CM_MLPERF_BACKEND: tvm-pytorch
add_deps_recursive:
mlperf-inference-implementation:
tags: _tvm-pytorch
tvm-tflite:
group: backend
base:
- batch_size.1
env:
CM_MLPERF_BACKEND: tvm-tflite
add_deps_recursive:
mlperf-inference-implementation:
tags: _tvm-tflite
cpu:
group:
device
default:
True
env:
CM_MLPERF_DEVICE:
cpu
add_deps_recursive:
mlperf-inference-implementation:
tags: _cpu
cuda:
group:
device
env:
CM_MLPERF_DEVICE:
gpu
add_deps_recursive:
mlperf-inference-implementation:
tags: _cuda
# Execution modes
fast:
group: execution-mode
env:
CM_FAST_FACTOR: '5'
CM_OUTPUT_FOLDER_NAME: fast_results
CM_MLPERF_RUN_STYLE: fast
test:
group: execution-mode
default: true
env:
CM_OUTPUT_FOLDER_NAME: test_results
CM_MLPERF_RUN_STYLE: test
valid:
group: execution-mode
env:
CM_OUTPUT_FOLDER_NAME: valid_results
CM_MLPERF_RUN_STYLE: valid
# Model precision
quantized:
alias: int8
fp32:
group: precision
default: true
env:
CM_MLPERF_QUANTIZATION: off
CM_MLPERF_MODEL_PRECISION: float32
add_deps_recursive:
python-reference-mlperf-inference:
tags: _fp32
float16:
group: precision
env:
CM_MLPERF_QUANTIZATION: off
CM_MLPERF_MODEL_PRECISION: float32
add_deps_recursive:
python-reference-mlperf-inference:
tags: _float16
bfloat16:
group: precision
env:
CM_MLPERF_QUANTIZATION: off
CM_MLPERF_MODEL_PRECISION: float32
add_deps_recursive:
python-reference-mlperf-inference:
tags: _bfloat16
int8:
group: precision
env:
CM_MLPERF_QUANTIZATION: on
CM_MLPERF_MODEL_PRECISION: int8
add_deps_recursive:
mlperf-inference-implementation:
tags: _int8
uint8:
group: precision
env:
CM_MLPERF_QUANTIZATION: on
CM_MLPERF_MODEL_PRECISION: uint8
add_deps_recursive:
mlperf-inference-implementation:
tags: _uint8
power:
env:
CM_MLPERF_POWER: 'yes'
CM_SYSTEM_POWER: 'yes'
add_deps_recursive:
runner:
tags:
_mlperf-power
batch_size.#:
env:
CM_MLPERF_LOADGEN_MAX_BATCHSIZE: '#'
add_deps_recursive:
mlperf-inference-implementation:
tags: _batch_size.#
# Reproducibility (past submissions)
r2.1_default:
group:
reproducibility
add_deps_recursive:
compiler:
tags: llvm
inference-src:
tags: _octoml
loadgen:
version: r2.1
env:
CM_RERUN: 'yes'
CM_SKIP_SYS_UTILS: 'yes'
CM_TEST_QUERY_COUNT: '100'
invalid_variation_combinations:
-
- resnet50
- pytorch
-
- retinanet
- tf
-
- nvidia-original
- tf
-
- nvidia-original
- onnxruntime
-
- nvidia-original
- pytorch
-
- nvidia
- tf
-
- nvidia
- onnxruntime
-
- nvidia
- pytorch
-
- gptj
- tf
gui_title: "CM GUI for the MLPerf inference benchmark"
input_description:
scenario:
desc: "MLPerf inference scenario"
choices:
- Offline
- Server
- SingleStream
- MultiStream
default: Offline
mode:
desc: "MLPerf inference mode"
choices:
- performance
- accuracy
default: accuracy
test_query_count:
desc: "Specifies the number of samples to be processed during a test run"
target_qps:
desc: "Target QPS"
target_latency:
desc: "Target Latency"
max_batchsize:
desc: "Maximum batchsize to be used"
num_threads:
desc: "Number of CPU threads to launch the application with"
hw_name:
desc: "Valid value - any system description which has a config file (under same name) defined [here](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-configs-sut-mlperf-inference/configs)"
output_dir:
desc: "Location where the outputs are produced"
rerun:
desc: "Redo the run even if previous run files exist"
boolean: true
default: true
regenerate_files:
desc: "Regenerates measurement files including accuracy.txt files even if a previous run exists. This option is redundant if `--rerun` is used"
boolean: true
adr.python.name:
desc: "Python virtual environment name (optional)"
default: mlperf
adr.python.version_min:
desc: "Minimal Python version"
default: "3.8"
adr.python.version:
desc: "Force Python version (must have all system deps)"
adr.compiler.tags:
desc: "Compiler for loadgen"
default: gcc
adr.inference-src-loadgen.env.CM_GIT_URL:
desc: "Git URL for MLPerf inference sources to build LoadGen (to enable non-reference implementations)"
adr.inference-src.env.CM_GIT_URL:
desc: "Git URL for MLPerf inference sources to run benchmarks (to enable non-reference implementations)"
quiet:
desc: "Quiet run (select default values for all questions)"
boolean: true
default: false
readme:
desc: "Generate README with the reproducibility report"
debug:
desc: "Debug MLPerf script"