-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BUG] Cutlass' static library defines fewer symbols than the shared library #1828
Comments
We debugged this issue and found out that the static library doesn't appear to be link against the compiled versions of the autogenerated kernels i.e. the files in |
This issue has been labeled |
@joerowell, aside from the symbol visibility, if you link against the static libraries does your application function properly? Before spending too much time debugging, I was just curious if this is mostly an academic exercise or if you have noticed failures trying to link against the static versions. The visibility rules and how the linker handles the libraries is different between static and shared, so sometimes it's not obvious where symbols are found. For instance, a shared library will show symbols that are imported from another library. Libraries don't really |
This issue has been labeled |
Describe the bug
I've recently been playing around with building cutlass as both a shared and static library. However, I've noticed that the static library often omits some symbols that are present in the shared library.
Steps/Code to reproduce bug
I've encountered this issue on 3a8c01a. I've not tried any other cutlass versions, but I don't think there would be a difference.
First, make and navigate to a
build
directory from the cutlass root directory. Then, configure cutlass' build system using the followingcmake
command:The NVCC archs, tests and unity builds aren't that important for reproducibility: I've seen the issue occur in many different configurations of flags.
Then, compile both the static and the shared libraries via
make
.This should succeed. Finally, run the following commands and notice the different outputs:
Moreover, if I actually look at the symbols themselves, I see that the static library doesn't actually define all of the symbols.
Whereas the shared library does define these:
This means that a third-party application that wants to statically link against cutlass is somewhat limited.
Expected behavior
My expectation would be that the static library would export all non-explicitly hidden symbols. I appreciate there's some subtle linker behaviour that can influence how symbols are exported, but this seems unusual.
The text was updated successfully, but these errors were encountered: