pengzhao-intel commented on issue #9744: Performance regression when 
OMP_NUM_THREADS environment variable is not set
URL: 
https://github.com/apache/incubator-mxnet/issues/9744#issuecomment-367711172
 
 
   @cjolivier01 Thanks for the fix. I have tested in my local with your code.
   
   The OMP_NUM_THREADS issue is fixed, but 10% performance degrade from KMP 
setting.
   Could you help fix this issue too?
   
   Please see my log:
   
   [patric@mlt-skx075 mxnet-reg]$ export 
KMP_AFFINITY=granularity=fine,noduplicates,compact,1,0
   [patric@mlt-skx075 mxnet-reg]$ export OMP_NUM_THREADS=56
   [patric@mlt-skx075 mxnet-reg]$ python 
example/image-classification/benchmark_score.py
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/patric/develop/omp_fix/python/mxnet/module/base_module.py:65: 
UserWarning: Data provided by label_shapes don't match names specified by 
label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   [23:03:45] src/operator/nn/mkldnn/mkldnn_base.cc:60: Allocate 411041792 
bytes with malloc directly
   **INFO:root:batch size 128, image/sec: 189.037230**
   
   [patric@mlt-skx075 mxnet-reg]$ unset KMP_AFFINITY
   [patric@mlt-skx075 mxnet-reg]$ unset OMP_NUM_THREADS
   [patric@mlt-skx075 mxnet-reg]$ python 
example/image-classification/benchmark_score.py
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/patric/develop/omp_fix/python/mxnet/module/base_module.py:65: 
UserWarning: Data provided by label_shapes don't match names specified by 
label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   [23:04:20] src/operator/nn/mkldnn/mkldnn_base.cc:60: Allocate 411041792 
bytes with malloc directly
   **INFO:root:batch size 128, image/sec: 169.450103**
   
   [patric@mlt-skx075 mxnet-reg]$ export OMP_NUM_THREADS=56
   [patric@mlt-skx075 mxnet-reg]$ python 
example/image-classification/benchmark_score.py
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/patric/develop/omp_fix/python/mxnet/module/base_module.py:65: 
UserWarning: Data provided by label_shapes don't match names specified by 
label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   [23:04:44] src/operator/nn/mkldnn/mkldnn_base.cc:60: Allocate 411041792 
bytes with malloc directly
   **INFO:root:batch size 128, image/sec: 168.383920**
   
   [patric@mlt-skx075 mxnet-reg]$ export 
KMP_AFFINITY=granularity=fine,noduplicates,compact,1,0
   [patric@mlt-skx075 mxnet-reg]$ python 
example/image-classification/benchmark_score.py
   INFO:root:network: resnet-50
   INFO:root:device: cpu(0)
   /home/patric/develop/omp_fix/python/mxnet/module/base_module.py:65: 
UserWarning: Data provided by label_shapes don't match names specified by 
label_names ([] vs. ['softmax_label'])
     warnings.warn(msg)
   [23:05:10] src/operator/nn/mkldnn/mkldnn_base.cc:60: Allocate 411041792 
bytes with malloc directly
   **INFO:root:batch size 128, image/sec: 188.962690**
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to