-
Notifications
You must be signed in to change notification settings - Fork 194
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
Hiding symbols from shared object libraries #1723
Conversation
We should check the binary size of libraft after this change. We have a lot of duplicate kernels. When they are static they will be duplicated in each TU and linked into libraft.so. The impact might also be smaller than expected because the linker seems not to deduplicate kernels with weak linkage anyway(?) |
Strictly speaking, this is only half of the solution. The other half is to annotate all non-kernel template functions that aren't part of the API of any pre-built DLLs with |
@jrhemstad yep, that's right. The first half of the solution was a simple search and replace. I realized the second half is much more involved and is going to require scraping through the entire codebase and adding a macro before every host template function that launches a kernel. |
After discussing internally with @ahendriksen, allow me to contradict myself (again) and suggest that the macro you want is actually:
This is because when compiling with For more info, see: NVIDIA/cccl#166 (comment) |
/ok to test |
…FT_KERNEL_ (need to fix others at some point as well).
…fea-2310_hide_symbols
/ok to test |
fyi, here's the solution we ended up using in Thrust/CUB: NVIDIA/cccl#443 |
Partially addresses #1722.