Add more export symbol to HalideIR#45
Merged
tqchen merged 4 commits intodmlc:masterfrom Jan 25, 2019
Merged
Conversation
By default, compilation of Linux shared library modules (*.so files)
exports all symbols. This creates large module files as the export
symbol tables contains too many entries. The correct approach is
export nothing by default and anything that needs to be exported
must be explicitly specified. This is accomplished by the following
steps:
1. In the Makefile, add "-fvisibility=hidden" flag. You can search
for "-fPIC" to find the appropriate place to add the flag. This
hides symbols by default if not explicitly specified otherwise.
2. To declaration of any symbol to be exported, add this attribute:
__attribute__((visibility("default")))
The attribute string can be added using a macro definition. It
should be added right before the return type for functions, or
right after the 'class' or 'struct' keyword for class/struct.
For more info on shared module export symbol visibility read:
http://anadoxin.org/blog/control-over-symbol-exports-in-gcc.html
… all symbols which is inefficient, and change was make to do explicit exports. So now some of the symbols become unresolved external symbols and need to be explicitly exported.
…t Expr &e) This change is needed because of a unit test needs it: http://ci.tvm.ai:8080/blue/organizations/jenkins/tvm/detail/PR-2445/33/pipeline
tqchen
approved these changes
Jan 25, 2019
This file contains hidden or 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
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.
template<> void ExprNode::accept(IRVisitor *v, const Expr& e) needs to be export now because of recent commit apache/tvm@859bda8