-
Notifications
You must be signed in to change notification settings - Fork 75
SWDEV-561590 - hipcc/ld.lld unable to link separable compilation when… #437
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
base: amd-staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,10 +247,8 @@ class HIPUndefinedFatBinSymbols { | |
| // Handling for defined symbols | ||
| if (!isUndefined) { | ||
| if (isFatBinSymbol) { | ||
| DefinedFatBinSymbols.insert(Name.str()); | ||
| FatBinSymbols.erase(Name.str()); | ||
| } else if (isGPUBinHandleSymbol) { | ||
| DefinedGPUBinHandleSymbols.insert(Name.str()); | ||
| GPUBinHandleSymbols.erase(Name.str()); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. - if (!isUndefined) {
+ if (!isUndefined && !isHidden) {
if (isFatBinSymbol) {
DefinedFatBinSymbols.insert(Name.str());
FatBinSymbols.erase(Name.str());
- } else if (isGPUBinHandleSymbol && (!isHidden) ) {
+ } else if (isGPUBinHandleSymbol) {
DefinedGPUBinHandleSymbols.insert(Name.str());
GPUBinHandleSymbols.erase(Name.str());
}I don't recall if I've specifically seen that
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @omor1. You're right. Sam suggested we just remove the code to add these symbols if they are already defined. I've added a new commit. And the change is for both of the _hip symbols. |
||
| continue; | ||
|
|
||
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.
Doesn't this mean that
DefinedFatBinSymbolsandDefinedGPUBinHandleSymbolsare always empty? Therefore, theDefinedFatBinSymbols.find(Name) == DefinedFatBinSymbols.end()check below is always true, so that the code becomes:I think then there's an issue where the order in which files are processed impacts whether a symbol is stored in
FatBinSymbolsandGPUBinHandleSymbols:hipcc -o output defined_use.o undefined_use.owill probably result in multiple-definition errors.