MKLDNN dynamically linked

2018-11-29 Thread Alex Zai
Created new thread for this as my email were not sending through my work
email. Original thread can be found here (
https://lists.apache.org/list.html?d...@mxnet.apache.org:lte=1M:dynamically)

There seems to be an issue linking static libraries (MKLDNN) on windows as
not all VS compilers support statically linking (
https://stackoverflow.com/questions/18901128/link-static-library-using-cmake
)

PR can be tracked here (
https://github.com/apache/incubator-mxnet/pull/13197). Jenkins fails on
windows build.

There are two routes I see here (both non-ideal):

1. Keep mkldnn as a dynamically linked library. This will cause
issues, especially since the mkldnn version has been incremented to 0.17
and soon to be 0.17.1.

2. Change build file such that mkldnn is statically linked in
linux/mac but remains dynamically linked on windows. This will complicate
our build files (cmakelistfile and makefile) but it may be easier to
resolve mkldnn issues on mac/linux since we'll know what version of mkldnn
they are using.


Re: MKLDNN dynamically linked

2018-11-08 Thread Hagay Lupesko
+1
Kellen made a good call about watching out for the license. Not an issue
for MKL-DNN though, which I believe has an Apache 2 license.

On Thu, Nov 8, 2018 at 3:51 PM Zhao, Patric  wrote:

> +1 for static link :)
>
> Feel free to let us know if anything we can help.
>
> > -Original Message-
> > From: kellen sunderland [mailto:kellen.sunderl...@gmail.com]
> > Sent: Friday, November 9, 2018 7:30 AM
> > To: dev@mxnet.incubator.apache.org
> > Cc: d...@mxnet.apache.org
> > Subject: Re: MKLDNN dynamically linked
> >
> > I think we should bias towards static linking.  It should make using
> mxnet
> > easier in a lot of cases for users.  As long as the license permits
> static linking
> > (i.e. is non-gpl) I'd +1 static linking for portability and ease of
> use.  The only
> > caveat would be in cases where the package size would cause grief for
> PyPi
> > maintainers.
> >
> > On Thu, Nov 8, 2018, 3:54 PM Sheng Zha  >
> > > +1. Ideally, MKLDNN can be statically linked. mxnet-mkl relies on Make
> > > +for
> > > building it so help is wanted on mxnet.
> > >
> > > -sz
> > >
> > > On 2018/11/08 21:28:50, Alex Zai  wrote:
> > > > Currently in mxnet-mkl the libmxnet.so is dynamically linked to to
> > > > libmkldnn.so.0. This is known to cause some issues if the wrong
> > > > version
> > > of
> > > > mkldnn is linked. Can we static link this file instead?
> > > >
> > > > Alex
> > > >
> > >
>


RE: MKLDNN dynamically linked

2018-11-08 Thread Zhao, Patric
+1 for static link :)

Feel free to let us know if anything we can help.

> -Original Message-
> From: kellen sunderland [mailto:kellen.sunderl...@gmail.com]
> Sent: Friday, November 9, 2018 7:30 AM
> To: dev@mxnet.incubator.apache.org
> Cc: d...@mxnet.apache.org
> Subject: Re: MKLDNN dynamically linked
> 
> I think we should bias towards static linking.  It should make using mxnet
> easier in a lot of cases for users.  As long as the license permits static 
> linking
> (i.e. is non-gpl) I'd +1 static linking for portability and ease of use.  The 
> only
> caveat would be in cases where the package size would cause grief for PyPi
> maintainers.
> 
> On Thu, Nov 8, 2018, 3:54 PM Sheng Zha  
> > +1. Ideally, MKLDNN can be statically linked. mxnet-mkl relies on Make
> > +for
> > building it so help is wanted on mxnet.
> >
> > -sz
> >
> > On 2018/11/08 21:28:50, Alex Zai  wrote:
> > > Currently in mxnet-mkl the libmxnet.so is dynamically linked to to
> > > libmkldnn.so.0. This is known to cause some issues if the wrong
> > > version
> > of
> > > mkldnn is linked. Can we static link this file instead?
> > >
> > > Alex
> > >
> >


Re: MKLDNN dynamically linked

2018-11-08 Thread kellen sunderland
I think we should bias towards static linking.  It should make using mxnet
easier in a lot of cases for users.  As long as the license permits static
linking (i.e. is non-gpl) I'd +1 static linking for portability and ease of
use.  The only caveat would be in cases where the package size would cause
grief for PyPi maintainers.

On Thu, Nov 8, 2018, 3:54 PM Sheng Zha  +1. Ideally, MKLDNN can be statically linked. mxnet-mkl relies on Make for
> building it so help is wanted on mxnet.
>
> -sz
>
> On 2018/11/08 21:28:50, Alex Zai  wrote:
> > Currently in mxnet-mkl the libmxnet.so is dynamically linked to to
> > libmkldnn.so.0. This is known to cause some issues if the wrong version
> of
> > mkldnn is linked. Can we static link this file instead?
> >
> > Alex
> >
>


Re: MKLDNN dynamically linked

2018-11-08 Thread Sheng Zha
+1. Ideally, MKLDNN can be statically linked. mxnet-mkl relies on Make for 
building it so help is wanted on mxnet.

-sz

On 2018/11/08 21:28:50, Alex Zai  wrote: 
> Currently in mxnet-mkl the libmxnet.so is dynamically linked to to
> libmkldnn.so.0. This is known to cause some issues if the wrong version of
> mkldnn is linked. Can we static link this file instead?
> 
> Alex
> 


MKLDNN dynamically linked

2018-11-08 Thread Alex Zai
Currently in mxnet-mkl the libmxnet.so is dynamically linked to to
libmkldnn.so.0. This is known to cause some issues if the wrong version of
mkldnn is linked. Can we static link this file instead?

Alex