You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

This page details benchmark results comparing MXNet 1.3.0 with MKLDNN vs without MKLDNN. The results clearly shows that MKL-DNN boosts inference throughput between 6x to 37x, latency reduced between 2x to 41x, while accuracy is exactly equivalent.

Inference Performance

This group of the performance test is gathered on AWS EC2 instance C5.18xLarge with 1 socket and 1 processor.

For the throughput, 2 sockets can provide about 2X speedup while latency will keep the constant.

Performance boost with Intel MKL-DNN backend in release 1.3

The c5.18xlarge instance offers a 2-socket Intel Xeon Platinum processor with 72 vCPUs.

$ export KMP_AFFINITY=granularity=fine,compact,1,0

$ export OMP_NUM_THREADS=18

$ numactl --physcpubind=0-17 --membind=0 python …


Category

Model

Latency batchsize=1 (ms, small is better)

Throughput batchsize=128 (fps, higher is better)

no mkldnn

release 1.3 + mkldnn

speedup

no mkldnn

release 1.3 + mkldnn

speedup

CNN/classification

ResNet-50 v1

97.19

18.94

5.13

10.29

132.05

12.84

ResNet-50 v2

98.69

18.93

5.21

9.94

127.17

12.79

Inception v3

175.17

26.34

6.65

5.74

110.00

19.16

Inception v4

330.93

66.96

4.94

3.04

59.28

19.47

DenseNet

111.66

53.31

2.09

8.52

121.79

14.30

MobileNet

38.56

7.32

5.27

24.87

380.54

15.30

VGG16

406.50

40.08

10.14

2.91

69.84

23.96

AlexNet

64.60

4.33

14.90

26.58

689.86

25.96

inception-resnet v2

181.10

111.28

1.63

5.48

69.39

12.66

CNN/object detection

Faster R-CNN

1175.74

95.15

12.36

0.85

10.51

12.36

SSD-VGG16

721.03

127.48

5.66

1.43(batchsize=224)

27.35(batchsize=224)

19.13

SSD-MobileNet

 239.40

100.75

 2.39

 4.07 (batchsize=256)

57.73(batchsize=256)

14.18 

RNN

GNMT

683.43

100.30

6.81

1.46(batchsize=64)

9.97(batchsize=64)

6.83

GAN

DCGAN

8.94

0.22

41.36

109.13

4059.74

37.20

Inference Accuracy

The model is from gluon model zoo by pre-trained parameters. The top1 and top5 accuracy are verified by MKL-DNN backend. 

As below table shown, the accuracy from MXNet 1.3 without and with MKL-DNN got the exact same results with 10e-8.


Note: The dataset used ImageNet1k valdata/ are generated by https://github.com/apache/incubator-mxnet/blob/master/example/image-classification/data/imagenet1k-val.sh

Inference Accuracy Comparison
AliasNetwork# ParametersCPU (without MKL-DNN)CPU (with MKL-DNN Backend)
 top1 top5 top1 top5
alexnetAlexNet61,100,8400.5631250.789921880.5631250.7899219
densenet121DenseNet-1218,062,5040.742031250.919296880.74203130.9192969
densenet161DenseNet-16128,900,9360.771953130.933906250.77195310.9339063
densenet169DenseNet-16914,307,8800.757109380.928281250.75710940.9282813
densenet201DenseNet-20120,242,9840.76906250.93093750.76906250.9309375
inceptionv3Inception V3 299x29923,869,0000.776093750.936640630.77609380.9366406
mobilenet0.25MobileNet 0.25475,5440.510390630.7568750.51039060.756875
mobilenet0.5MobileNet 0.51,342,5360.618515630.837890630.61851560.8378906
mobilenet0.75MobileNet 0.752,601,9760.665468750.870703130.66546880.8707031
mobilenet1.0MobileNet 1.04,253,8640.70093750.891093750.70093750.8910938
mobilenetv2_1.0MobileNetV2 1.03,539,1360.699765630.89281250.69976560.8928125
mobilenetv2_0.75MobileNetV2 0.752,653,8640.682109380.880078130.68210940.8800781
mobilenetv2_0.5MobileNetV2 0.51,983,1040.644531250.849296880.64453130.8492969
mobilenetv2_0.25MobileNetV2 0.251,526,8560.508906250.745468750.50890630.7454688
resnet18_v1ResNet-18 V111,699,1120.7081250.894531250.7081250.8945313
resnet34_v1ResNet-34 V121,814,6960.739609380.916093750.73960940.9160938
resnet50_v1ResNet-50 V125,629,0320.7606250.930468750.7606250.9304688
resnet101_v1ResNet-101 V144,695,1440.7793750.936171880.7793750.9361719
resnet152_v1ResNet-152 V160,404,0720.783203130.938671880.78320310.9386719
resnet18_v2ResNet-18 V211,695,7960.710468750.896718750.71046880.8967188
resnet34_v2ResNet-34 V221,811,3800.740859380.915781250.74085940.9157813
resnet50_v2ResNet-50 V225,595,0600.76750.9318750.76750.931875
resnet101_v2ResNet-101 V244,639,4120.781250.940156250.781250.9401563
resnet152_v2ResNet-152 V260,329,1400.785546880.941406250.78554690.9414063
squeezenet1.0SqueezeNet 1.01,248,4240.572734380.795546880.57273440.7955469
squeezenet1.1SqueezeNet 1.11,235,4960.570234380.796015630.57023440.7960156
vgg11VGG-11132,863,3360.6706250.87531250.6706250.8753125
vgg13VGG-13133,047,8480.681328130.879843750.68132810.8798438
vgg16VGG-16138,357,5440.7206250.905859380.7206250.9058594
vgg19VGG-19143,667,2400.73468750.910.73468750.91
vgg11_bnVGG-11 with batch normalization132,874,3440.689531250.888828130.68953130.8888281
vgg13_bnVGG-13 with batch normalization133,059,6240.698359380.889531250.69835940.8895313
vgg16_bnVGG-16 with batch normalization138,374,4400.722265630.903906250.72226560.9039063
vgg19_bnVGG-19 with batch normalization143,689,2560.729921880.909921880.72992190.9099219
  • No labels