You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/14 19:31:57 UTC

[GitHub] ashokei commented on issue #12502: [NGRAPH] MXNet - nGraph initial integration

ashokei commented on issue #12502: [NGRAPH] MXNet - nGraph initial integration
URL: https://github.com/apache/incubator-mxnet/pull/12502#issuecomment-454131909
 
 
   @zheng-da MKLDNN issue has been resolved, this PR uses the default MXNet MKLDNN. So, when users build with `make USE_NGRAPH=1` , all the following options work
   
   ```
   MXNET_SUBGRAPH_BACKEND="" python example/image-classification/benchmark_score.py --network resnet-50
   
   MXNET_SUBGRAPH_BACKEND="MKLDNN" python example/image-classification/benchmark_score.py --network resnet-50
   
   MXNET_SUBGRAPH_BACKEND="ngraph" python example/image-classification/benchmark_score.py --network resnet-50
   ```
   
   With this PR (built with `make USE_NGRAPH=1`) , We ran resnet-50 on AWS c5.18xlarge instance with benchmark_score.py, below are the results (`MXNET_SUBGRAPH_BACKEND=""` uses default MXNet MKLDNN ops)
   ```
   ubuntu@aws-c5-18xlarge:~/mxnet-upstream$ MXNET_SUBGRAPH_BACKEND="" OMP_NUM_THREADS=18 env KMP_BLOCKTIME=1 env KMP_AFFINITY=granularity=fine,compact,1,0 python example/image-classification/benchmark_score.py --network resnet-50
   INFO:root:run batchsize [1, 32, 64, 128, 256] by default, set --batch-size to run a specific one
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/ubuntu/mxnet-upstream/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   INFO:root:batch size  1, dtype float32, images/sec: 90.258317
   INFO:root:batch size 32, dtype float32, images/sec: 152.033810
   INFO:root:batch size 64, dtype float32, images/sec: 151.357087
   INFO:root:batch size 128, dtype float32, images/sec: 150.144761
   INFO:root:batch size 256, dtype float32, images/sec: 148.233113
   
   ubuntu@aws-c5-18xlarge:~/mxnet-upstream$ MXNET_SUBGRAPH_BACKEND="MKLDNN" OMP_NUM_THREADS=18 env KMP_BLOCKTIME=1 env KMP_AFFINITY=granularity=fine,compact,1,0 python example/image-classification/benchmark_score.py --network resnet-50
   INFO:root:run batchsize [1, 32, 64, 128, 256] by default, set --batch-size to run a specific one
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/ubuntu/mxnet-upstream/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   [19:27:50] src/operator/subgraph/mkldnn/mkldnn_conv_property.cc:138: Start to execute MKLDNN Convolution optimization pass.
   INFO:root:batch size  1, dtype float32, images/sec: 110.765558
   [19:27:50] src/operator/subgraph/mkldnn/mkldnn_conv_property.cc:138: Start to execute MKLDNN Convolution optimization pass.
   INFO:root:batch size 32, dtype float32, images/sec: 191.871125
   [19:27:53] src/operator/subgraph/mkldnn/mkldnn_conv_property.cc:138: Start to execute MKLDNN Convolution optimization pass.
   INFO:root:batch size 64, dtype float32, images/sec: 191.062513
   [19:27:58] src/operator/subgraph/mkldnn/mkldnn_conv_property.cc:138: Start to execute MKLDNN Convolution optimization pass.
   INFO:root:batch size 128, dtype float32, images/sec: 193.064107
   [19:28:09] src/operator/subgraph/mkldnn/mkldnn_conv_property.cc:138: Start to execute MKLDNN Convolution optimization pass.
   INFO:root:batch size 256, dtype float32, images/sec: 191.515350
   
   ubuntu@aws-c5-18xlarge:~/mxnet-upstream$ MXNET_SUBGRAPH_BACKEND="ngraph" OMP_NUM_THREADS=18 env KMP_BLOCKTIME=1 env KMP_AFFINITY=granularity=fine,compact,1,0 python example/image-classification/benchmark_score.py --network resnet-50
   INFO:root:run batchsize [1, 32, 64, 128, 256] by default, set --batch-size to run a specific one
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/ubuntu/mxnet-upstream/python/mxnet/module/base_module.py:67: UserWarning: Data provided by label_shapes don't match names specified by label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   INFO:root:batch size  1, dtype float32, images/sec: 125.942216
   INFO:root:batch size 32, dtype float32, images/sec: 224.910995
   INFO:root:batch size 64, dtype float32, images/sec: 227.315916
   INFO:root:batch size 128, dtype float32, images/sec: 225.936182
   INFO:root:batch size 256, dtype float32, images/sec: 226.969117
   
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services