apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.79k stars 6.79k forks source link

Amalgamation #19193

Closed believeitmyway closed 4 years ago

believeitmyway commented 4 years ago

The amalgamation folder seems to disappear from the repo, is it no longer supported? I want to minimize the dependency and convert it to a single file. Is there another way?

github-actions[bot] commented 4 years ago

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

szha commented 4 years ago

Amalgamation is still available in v1.x.

In terms of generating a single binary to link to that minimizes dependency, you could use -DMXNET_BUILD_SHARED_LIBS=OFF to build static library of mxnet with .a extension, link to it, and strip all symbols that weren't used. On linux, you can use strip --strip-unneeded on your final library so file for this purpose.

believeitmyway commented 4 years ago

Thank you so much. I have another question. The URL below states that we can also remove the dependency on BLAS. Is there any procedure for that?

https://mxnet.apache.org/versions/1.7/api/faq/smart_device

szha commented 4 years ago

I think that comment may be outdated. BLAS functions include accelerated gemm which is quite essential to deep learning. I would recommend to always choose a BLAS library in any case.

believeitmyway commented 4 years ago

I understand that. Thank you!