-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Consider MXNET_BUILD_SHARED_LIBS flag #18365
Conversation
Hey @cbalint13 , Thanks for submitting the PR
CI supported jobs: [edge, centos-cpu, unix-gpu, sanity, windows-gpu, miscellaneous, unix-cpu, website, clang, windows-cpu, centos-gpu] Note: |
Thanks @cbalint13 . Actually we may improve the defaults for upcoming MXNet 2. I suggest to make the "build shared" the default and optionally allow to build only the static library. (ie following the CMAKE_BUILD_SHARED) approach. What do you think? |
@leezu , Let's try, will see how will pass CI. |
@leezu , UPDATE: Followed your proposal, updated the code.
Let me know if need more work on it. |
Thanks @cbalint13. I wonder if we should only build the static library if |
@leezu , Uhh, Ohh.
|
Actually not. There is a hack further down in the cmake file where the complete static object is included as is into the shared object. So there is not much difference between the two besides the format.
What do you mean? |
@mxnet-bot run ci [all] |
Jenkins CI successfully triggered : [windows-cpu, edge, sanity, website, centos-gpu, clang, unix-cpu, miscellaneous, unix-gpu, centos-cpu, windows-gpu] |
I am aware.
Will not pass CI. |
Why do you think so. The CI does not rely on the |
Can advice me on MacOS CI failure ? Dont get the meaning of error (can't see what symbol):
Thank You ! |
That's part of the problem. It comes with huge link, disk space and CI network traffic overheads due to the number of unittests.
I'm not yet sure about this error. Could you address above comments first (or state that you disagree) and then let's look more closely into this issue. |
@leezu static object should be useful in building standalone C++ inference programs. If the size of test is a problem, we can strip the binary after compilation. |
@szha sure. In that case just set BUILD_SHARED_LIBS=0. This is only about simplifying the cmake file to follow standard practice, reducing the amount of codes and hacks used by mxnet build system. |
|
@leezu ,
|
Adopting the standard But to keep things simple in this PR, it's fine to use an MXNet specific setting for now. I modified your PR slightly to reintroduce the MXNet specific option. |
Wow someone circumvent CI 🥇
Thank you very much @leezu ! |
Thanks @cbalint13 |
…pache#18365) * Consider BUILD_SHARED_LIBS flag * Use MXNET_BUILD_SHARED_LIBS
Description
MXNET_BUILD_SHARED_LIBS
build flagComments
Building pure shared version is distro's releng favorite way.
Thank You !