-
Notifications
You must be signed in to change notification settings - Fork 74k
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
[XLA] When LLVM doesn't know a CC that is more recent, warn only to developers. #41936
[XLA] When LLVM doesn't know a CC that is more recent, warn only to developers. #41936
Conversation
0bcd929
to
98f83bd
Compare
@@ -93,7 +93,11 @@ static string GetSmName(std::pair<int, int> compute_capability) { | |||
} | |||
} | |||
|
|||
if (sm_version != compute_capability_version) { | |||
// If the current CC isn't supported by LLVM and it is newer then | |||
// the max supported LLVM version, do not warn about it. The end |
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.
Can we please add that "Code compiled for SM75 will run on SM80 too".
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.
+1, though I'd s/Code/PTX/
@@ -93,7 +93,11 @@ static string GetSmName(std::pair<int, int> compute_capability) { | |||
} | |||
} | |||
|
|||
if (sm_version != compute_capability_version) { | |||
// If the current CC isn't supported by LLVM and it is newer then | |||
// the max supported LLVM version, do not warn about it. The end |
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.
+1, though I'd s/Code/PTX/
// the max supported LLVM version, do not warn about it. The end | ||
// user can't do anything about this. | ||
if (sm_version != compute_capability_version && | ||
compute_capability_version < *(supported_version.begin())) { |
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.
This could just be lack of coffee, but where is supported_version
defined?
98f83bd
to
db781e9
Compare
I amended the commit. It is true that I didn't take as much coffee today then usually :) I'll get one more now! |
db781e9
to
6c5d67a
Compare
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.
I amended the commit. It is true that I didn't take as much coffee today then usually :) I'll get one more now!
Btw, I meant maybe I need to get more coffee since I thought I was missing something obvious. :D
@@ -86,14 +86,20 @@ static string GetSmName(std::pair<int, int> compute_capability) { | |||
int sm_version = 35; | |||
// If the current compute capability isn't known, fallback to the | |||
// most recent version before it. | |||
for (int v : {75, 72, 70, 62, 61, 60, 53, 52, 50, 37, 35}) { | |||
auto supported_version = {75, 72, 70, 62, 61, 60, 53, 52, 50, 37, 35}; |
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.
Does this create a dangling reference? (I can never keep all of the C++ rules in my head.)
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.
That variable is inside a scope and doesn't leak to anywhere. So why do you think it could be a dangling reference?
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.
I was under the impression that the {a, b, c}
syntax creates an std::initializer_list
and that is only alive for the duration of the {75, 72, 70, 62, 61, 60, 53, 52, 50, 37, 35};
statement. Confusingly this seems to also have changed in C++14. https://en.cppreference.com/w/cpp/utility/initializer_list
CC @timshen91 in case he has guidance here.
@nouiz Can you please resolve conflicts? Thanks! |
Just input that Frederic is currently on vacation. Let me know if there is any urgent issues and I will help to deal with them; otherwise let's wait for his return. |
6c5d67a
to
b05fdf4
Compare
I updated this PR. |
tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc
Outdated
Show resolved
Hide resolved
tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc
Outdated
Show resolved
Hide resolved
…t. The end user can't do anything about it.
b05fdf4
to
d1abd38
Compare
I amended the commit for both comments. |
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
The end user can't do anything about it and this confuse them as they think they have an not-optimal software stack that they should fix.
@sanjoy @thomasjoerg