-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVM] Reduce symbol visibility of shared modules (*.so files)
Default compilation of Linux shared library modules (*.so files) exports all symbols. This creates large module files as the export symbol table contains too many entries. The correct approach is to export nothing by default. Anything that needs to be exported must be explicitly specified. This is done by the following steps: 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. To declare 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. To supress Doxygen parser warnings, modify docs/Doxyfile and add to PRE_DEFINED: TVM_DLL= NNVM_DLL= __attribute__(x)= For more info on shared module export symbol visibility read: https://gcc.gnu.org/wiki/Visibility Update submodule HalideIR to 7a3287d3883fdeac3aba2a7f3865c7ab78e1925c and dlpack to 5c792cef3aee54ad8b7000111c9dc1797f327b59. Explicitly export __gnu_f2h_ieee() which is needed in a unit test. Move the visibility specifier to header files.
- Loading branch information
1 parent
26dd34d
commit f88e2a7
Showing
14 changed files
with
67 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.