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 2018/10/24 08:08:21 UTC

[GitHub] huangzhiyuan opened a new pull request #12956: Add reshape op supported by MKL-DNN

huangzhiyuan opened a new pull request #12956: Add reshape op supported by MKL-DNN
URL: https://github.com/apache/incubator-mxnet/pull/12956
 
 
   ## Description ##
   This PR indents to add reshape op supported by MKL-DNN. It will help reduce the unnecessary reorder operations after a MKL-DNN operation. @pengzhao-intel @ZhennanQin 
    
   **Test network:**
   ```
   data = mx.symbol.Variable('data')
   conv1 = mx.symbol.Convolution(data=data, num_filter=16384, kernel=(1, 1), pad=(0, 0), stride=(1, 1))
   res = mx.symbol.reshape(data=conv1, shape=(16384,4,16,16))
   trans = mx.symbol.transpose(data=res)
   res1 = mx.symbol.reshape(data=trans, shape=(1, 1024, 1, 16384))
   conv2 = mx.symbol.Convolution(data=res1, num_filter=16384, kernel=(1, 1), pad=(0,0), stride=(1,1))
   ```
   
   **MKL-DNN verbose log changes are as follows:**
   
   mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_oihw out:f32_Ohwi16o,num:1,16384x3x1x1,0.0471191
   mkldnn_verbose,exec,convolution,jit:avx512_common,forward_inference,fsrc:nchw fwei:Ohwi16o fbia:x fdst:nChw16c,alg:convolution_direct,mb4_g1ic3oc16384_ih16oh16kh1sh1dh0ph0_iw16ow16kw1sw1dw0pw0,2.08691
   ~~mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_nChw16c out:f32_nchw,num:1,4x16384x16x16,2.44995~~
   ~~mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_nchw out:f32_nChw16c,num:1,4x16384x16x16,1.64697~~
   ~~mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_nChw16c out:f32_nchw,num:1,4x16384x16x16,2.30298~~
   mkldnn_verbose,exec,reorder,simple:any,undef,in:f32_nchw out:f32_nchw,num:1,16384x4x16x16,2.1731
   mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_nchw out:f32_nChw16c,num:1,1x1024x1x16384,2.40698
   mkldnn_verbose,exec,reorder,jit:uni,undef,in:f32_oihw out:f32_OIhw16i16o,num:1,16384x1024x1x1,2.29297
   mkldnn_verbose,exec,convolution,jit_1x1:avx512_common,forward_inference,fsrc:nChw16c fwei:OIhw16i16o fbia:x fdst:nChw16c,alg:convolution_direct,mb1_g1ic1024oc16384_ih1oh1kh1sh1dh0ph0_iw16384ow16384kw1sw1dw0pw0,457.164
   
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   

----------------------------------------------------------------
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