Skip to content
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

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

nouiz
Copy link
Contributor

@nouiz nouiz commented Jul 31, 2020

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

@google-ml-butler google-ml-butler bot added the size:S CL Change Size: Small label Jul 31, 2020
@nouiz nouiz changed the title [XLA] When LLVM doesn't know a CC that is more recent, doesn't warn about it [XLA] When LLVM doesn't know a CC that is more recent, warn only to developers. Jul 31, 2020
@gbaned gbaned self-assigned this Jul 31, 2020
@gbaned gbaned added the comp:xla XLA label Jul 31, 2020
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Jul 31, 2020
@gbaned gbaned requested a review from thomasjoerg July 31, 2020 13:16
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Jul 31, 2020
thomasjoerg
thomasjoerg previously approved these changes Jul 31, 2020
@@ -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
Copy link
Member

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".

Copy link
Contributor

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/

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jul 31, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 31, 2020
@@ -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
Copy link
Contributor

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())) {
Copy link
Contributor

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?

PR Queue automation moved this from Approved by Reviewer to Reviewer Requested Changes Jul 31, 2020
@google-ml-butler google-ml-butler bot removed the ready to pull PR ready for merge process label Jul 31, 2020
@nouiz
Copy link
Contributor Author

nouiz commented Jul 31, 2020

I amended the commit. It is true that I didn't take as much coffee today then usually :) I'll get one more now!

Copy link
Contributor

@sanjoy sanjoy left a 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};
Copy link
Contributor

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.)

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@gbaned gbaned added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Aug 3, 2020
@gbaned
Copy link
Contributor

gbaned commented Aug 3, 2020

@nouiz Can you please resolve conflicts? Thanks!

@trentlo
Copy link
Contributor

trentlo commented Aug 4, 2020

@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.

@gbaned gbaned added stat:awaiting response Status - Awaiting response from author and removed stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Aug 5, 2020
@nouiz
Copy link
Contributor Author

nouiz commented Aug 17, 2020

I updated this PR.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Aug 19, 2020
@nouiz
Copy link
Contributor Author

nouiz commented Aug 19, 2020

I amended the commit for both comments.

Copy link
Contributor

@sanjoy sanjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

PR Queue automation moved this from Reviewer Requested Changes to Approved by Reviewer Aug 19, 2020
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Aug 19, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Aug 19, 2020
@tensorflow-copybara tensorflow-copybara merged commit 6792e84 into tensorflow:master Aug 19, 2020
PR Queue automation moved this from Approved by Reviewer to Merged Aug 19, 2020
@nouiz nouiz deleted the upstream_master_tf2 branch August 20, 2020 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes comp:xla XLA ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

10 participants