-
Notifications
You must be signed in to change notification settings - Fork 9
PR for llvm/llvm-project#57544 #698
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
Conversation
Fixes llvm/llvm-project#57544 (cherry picked from commit 588023ddafb4b0cd11914ab068c6d07187374d69)
@yxsamliu should this be backported to 17.x? |
cc @AaronBallman @cor3ntin @erichkeane since it touches clang |
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 is this the correct fix instead of messing with __noinline__
? We already document __noinline__
as a CUDA keyword intended to avoid diagnostics with __attribute__((__noinline__))
, so this change seems questionable on its face.
I think this is to workaround nvcc header which defines |
As best I could tell from the original patch discussion, I think that's correct, but it seems this has been a long-standing NVCC bug that should be resolved in their headers rather than expecting compilers to work around it, yes? CC @erichkeane since this is attributes related. |
I don't have a good solution here, it seems that this is the NVCC headers leaking the definition unfortunately, and I've reached out to the CUDA team at NVIDIA to see if this is something that could be fixed in the future. However, that obviously doesn't fix the past, so I suspect we'll have to put this in anyway. |
Thanks for reaching out! And yeah, you're right, I think we're going to need this regardless. |
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.
LGTM
LGTM |
That's, unfortunately, true. Fun tidbit. NVCC itself does run into this problem and apparently deals with this by un-doing this mess. When it sees |
For the reference: NVIDIA/thrust#1703 (comment) |
resolves llvm/llvm-project#57544