-
Notifications
You must be signed in to change notification settings - Fork 305
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 non-necessary symbols from shared object #1136
Conversation
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
/te-ci |
@@ -0,0 +1,4 @@ | |||
{ | |||
global: *nvte*; *transformer_engine*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need *
before nvte
or transformer_engine
? Shouldn't it be nvte_*
instead (since that is the format of our C APIs)? I'm also not convinced we need to expose anything with transformer_engine
, could you give examples of the APIs we would want to expose that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The * before
nvte
andtransformer_engine
is needed because some symbols are mangled, for e.g._Z14nvte_unpermuteP...
. transformer_engine
is necessary because we use some functionality such as transformer_engine::getenv in the frameworks, so we need to define the symbol for it to load the framework shared objects.
Given how both *transformer_engine*
and (to a lesser extent) *nvte*
patterns are specific to TE, I think it's safe to continue exposing these globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Anything that is mangled is a bug since we advertise C API. In the case of permute it is because there is no
extern "C"
decorator around those functions. Also we are usingnullptr
instead ofNULL
or0
- apparently C23 introduced it but I don't think we want to expect people to have such new C standards. @phu0ngng could we have it fixed? - I thought we do not do this anymore and instead compile that function in each framework extension separately. @timmoon10 could you comment?
Pipeline 17865970 |
Signed-off-by: Kirthi Shankar Sivamani <[email protected]> Signed-off-by: beinggod <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Description
libtransformer_engine
currently exposes all symbols globally, which can lead to symbol resolution conflicts when certain libraries are exported after TE's shared object file is loaded dynamically, for .e.g.,Leads to the following error:
Type of change
Changes
libtransformer_engine
.Checklist: