TaoLv commented on issue #14893: Integrating the MKL VML functions to MXNET to 
speed-up the (element-wised) mathematic computation
URL: https://github.com/apache/incubator-mxnet/pull/14893#issuecomment-494433822
 
 
   LayerNorm performance is measured on my skl machine. Shapes are from BERT 
base and large model respectively. The speedup from this PR is around 3x~10x. 
@eric-haibin-lin @sxjscience @pengzhao-intel 
   ```
   # mxnet-mkl==1.4.1
   layernorm (1L, 128L, 768L): 0.23437 ms
   layernorm (8L, 128L, 768L): 1.39641 ms
   layernorm (32L, 128L, 768L): 5.18604 ms
   layernorm (1L, 128L, 1024L): 0.35661 ms
   layernorm (8L, 128L, 1024L): 1.80795 ms
   layernorm (32L, 128L, 1024L): 6.76601 ms
   
   # this PR built with USE_BLAS=mkl
   layernorm (1, 128, 768): 0.07230 ms
   layernorm (8, 128, 768): 0.21550 ms
   layernorm (32, 128, 768): 0.51188 ms
   layernorm (1, 128, 1024): 0.08863 ms
   layernorm (8, 128, 1024): 0.25120 ms
   layernorm (32, 128, 1024): 0.63479 ms
   ```

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


With regards,
Apache Git Services

Reply via email to