-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide symbols from dependent libraries if HIDE_PRIVATE_SYMBOLS is ON. #4041
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In current implementation HIDE_PRIVATE_SYMBOLS hides symbols from TVM itself but not from its dependent libraries. This is problematic when other third-party libraries with the same symbols are linked to the same executable. One example is using TVM with Mesa OpenCL drivers: they depend on LLVM and load its shared libraries with RTLD_GLOBAL flag, which results in conflicts with LLVM symbols that TVM uses. Arguably this particular issue belongs to Mesa (here's their tracking bug: https://gitlab.freedesktop.org/mesa/mesa/issues/236) but in general that's the right thing to do regardless of this particular bug. Note that I'm not enabling this functionality for Darwin as in my earlier tests their linker didn't seem to understand "--exclude-libs" (but I don't have test platform ATM to double-check).
tqchen
approved these changes
Oct 7, 2019
Thanks @ndl |
anijain2305
pushed a commit
to anijain2305/tvm
that referenced
this pull request
Oct 17, 2019
…pache#4041) In current implementation HIDE_PRIVATE_SYMBOLS hides symbols from TVM itself but not from its dependent libraries. This is problematic when other third-party libraries with the same symbols are linked to the same executable. One example is using TVM with Mesa OpenCL drivers: they depend on LLVM and load its shared libraries with RTLD_GLOBAL flag, which results in conflicts with LLVM symbols that TVM uses. Arguably this particular issue belongs to Mesa (here's their tracking bug: https://gitlab.freedesktop.org/mesa/mesa/issues/236) but in general that's the right thing to do regardless of this particular bug. Note that I'm not enabling this functionality for Darwin as in my earlier tests their linker didn't seem to understand "--exclude-libs" (but I don't have test platform ATM to double-check).
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Oct 18, 2019
…pache#4041) In current implementation HIDE_PRIVATE_SYMBOLS hides symbols from TVM itself but not from its dependent libraries. This is problematic when other third-party libraries with the same symbols are linked to the same executable. One example is using TVM with Mesa OpenCL drivers: they depend on LLVM and load its shared libraries with RTLD_GLOBAL flag, which results in conflicts with LLVM symbols that TVM uses. Arguably this particular issue belongs to Mesa (here's their tracking bug: https://gitlab.freedesktop.org/mesa/mesa/issues/236) but in general that's the right thing to do regardless of this particular bug. Note that I'm not enabling this functionality for Darwin as in my earlier tests their linker didn't seem to understand "--exclude-libs" (but I don't have test platform ATM to double-check).
petrex
added a commit
to petrex/tvm
that referenced
this pull request
Oct 29, 2019
* master: (21 commits) [Fix][VM] Fix VM invoke with set_params (apache#4079) [QNN] Refactor fixed point multiplication in requantize (apache#4073) Fix match case in Python-side expr functor (apache#4037) Hide symbols from dependent libraries if HIDE_PRIVATE_SYMBOLS is ON. (apache#4041) Add gradient for log-softmax (apache#4069) [DOC] Fix typos in tutorials (apache#4066) dicrease the complexity of CalcDep from exponential to linear (apache#4053) [Relay][AlterOp] Minor refactor. (apache#4064) [Relay][AlterOp] Improving support for broadcast layout alteration. (apache#4040) Add parses support for zeros_like tflite operator (apache#4042) [Bugfix][TF] reset graph after getting tag of savedmodel (apache#4055) [Relay][VM] Add more passes to VMCompiler (apache#4058) [Relay][VM] Add autotvm context when compile (apache#4062) [Bugfix] Fix target host for vm compiler (apache#4057) [Relay][Training] Add gradient for Crossentropy (apache#3925) [llvm] switch to use Align for llvm trunk (apache#4051) [Relay][TopHub] Add switch to disable TopHub download (apache#4015) [Relay][Op] Add instance norm op (apache#4004) [QNN][Relay] Calling Dialect passes from inside Relay Build API. (apache#3971) [RELAY/PASS] Fix the extent for the post_stmt in the loop partition (apache#3734) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In current implementation HIDE_PRIVATE_SYMBOLS hides symbols from TVM
itself but not from its dependent libraries. This is problematic when
other third-party libraries with the same symbols are linked to the
same executable.
One example is using TVM with Mesa OpenCL drivers: they depend on LLVM
and load its shared libraries with RTLD_GLOBAL flag, which results in
conflicts with LLVM symbols that TVM uses. Arguably this particular
issue belongs to Mesa (here's their tracking bug:
https://gitlab.freedesktop.org/mesa/mesa/issues/236) but in general
that's the right thing to do regardless of this particular bug.
Note that I'm not enabling this functionality for Darwin as in my
earlier tests their linker didn't seem to understand "--exclude-libs"
(but I don't have test platform ATM to double-check).