Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Update symbol visibility control #19057

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

leezu
Copy link
Contributor

@leezu leezu commented Sep 1, 2020

Prior to this commit, linker version scripts were used to control the set of
visible symbols. These scripts exported C++ symbols, that do not have a stable
ABI and should not have been exported. Instead, use MXNET_DLL macro to
annotate the visiblity in the source code and remove the linker version scripts where
possible.

Refer to "Deep CMake For Library Authors" CppCon 2019 talk by Craig Scott for
details on the cmake settings.

Some third-party libraries began relying on the C++ symbols, for example Horovod.
We need to rewrite their integration to only rely on the C API. These libraries are currently broken in any case, as they assume a different C++ ABI than the one used by the MXNet static build script. We can't change the static build script to adopt a different ABI without dropping support for RHEL7 based systems (see https://bugzilla.redhat.com/show_bug.cgi?id=1546704)

Prior to this commit, linker version scripts were used to control the set of
visible symbols. These scripts included C++ Symbols, that do not have a stable
ABI and should not have been exported. Instead, we annotate the visiblity in the
source code as per the best practice.

Refer to "Deep CMake For Library Authors" CppCon 2019 talk by Craig Scott for
details on the cmake settings.
@mxnet-bot
Copy link

Hey @leezu , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [windows-cpu, centos-gpu, unix-gpu, miscellaneous, website, windows-gpu, sanity, unix-cpu, centos-cpu, edge, clang]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

CMakeLists.txt Show resolved Hide resolved
@leezu
Copy link
Contributor Author

leezu commented Sep 1, 2020

@mxnet-bot run ci [centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-gpu]

@leezu leezu added the pr-awaiting-review PR is waiting for code review label Sep 2, 2020
@lanking520 lanking520 removed the pr-awaiting-review PR is waiting for code review label Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants