[GitHub] ashokei commented on issue #10773: specify common arch for mkldnn build, so it can be reused on all arch

2018-05-02 Thread GitBox
ashokei commented on issue #10773: specify common arch for mkldnn build, so it 
can be reused on all arch
URL: https://github.com/apache/incubator-mxnet/pull/10773#issuecomment-386193952
 
 
   This PR can work for runtime switching. The tradeoff is potential 
performance loss (which i do not see in my testing, as mkldnn already does 
runtime switching/JIT for its performance critical compute kernels). 
   
   I am following up with mkl-dnn team,  currently they did not give us any 
exact measurement on performance impact , if any. 
   
   If we truly need runtime switching for mkl-dnn+mxnet, they  (mkldnn team) 
suggest we set `-march` to common baseline architecture.
   
   Another extra option we could explore, is to add this PR with a optional 
build flag to build for native arch if users know they do not need runtime 
switching (via an environment export variable as i mention above).
   


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


[GitHub] ashokei commented on issue #10773: specify common arch for mkldnn build, so it can be reused on all arch

2018-05-02 Thread GitBox
ashokei commented on issue #10773: specify common arch for mkldnn build, so it 
can be reused on all arch
URL: https://github.com/apache/incubator-mxnet/pull/10773#issuecomment-386191597
 
 
   we can explore other options.  One solution is to do this if some 
environment variable is exported, maybe. @szha is that ok? we could use it only 
for CI , or other use-cases where users may build on one system and copy to 
different arch system.
   
   
   


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


[GitHub] ashokei commented on issue #10773: specify common arch for mkldnn build, so it can be reused on all arch

2018-05-02 Thread GitBox
ashokei commented on issue #10773: specify common arch for mkldnn build, so it 
can be reused on all arch
URL: https://github.com/apache/incubator-mxnet/pull/10773#issuecomment-386185282
 
 
   @TaoLv @szha I measured the performance with this PR change on inference 
models using benchmark_score script. I did not see any performance difference. 
   
   Intel mkl-dnn team recommended this approach when i asked them about 
"similar option to DYNAMIC_ARCH in openblas" for mkldnn.  
   
   mklml library (which is shipped as part of mkldnn) uses this approach.
   
   @zheng-da This flag will ensure a common baseline arch is used, instead of 
`native` or default arch of the system used for building mkldnn. This will just 
ensure the auxiliary/support code does not cause illegal instruction/crash etc. 
The actual mkldnn kernels/primitives are generated at runtime based on 
underlying arch of the system being used for running.


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


[GitHub] ashokei commented on issue #10773: specify common arch for mkldnn build, so it can be reused on all arch

2018-05-02 Thread GitBox
ashokei commented on issue #10773: specify common arch for mkldnn build, so it 
can be reused on all arch
URL: https://github.com/apache/incubator-mxnet/pull/10773#issuecomment-386153872
 
 
   If we build on same machine, and use on same machine then there is no 
problem. I notice CI , or other use-cases where we may be building on one 
machine and copying mkldnn lib along with mxnet to other machine with differnt 
arch. This PR will make the build be compatible by using a common baseline.
   
   There will not be any performance impact, as the mkldnn kernels/primitives 
are generated runtime based on underlying arch. This PR is only to make the 
build itself compatible across systems.


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