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

GPU fusion code cleanup: Extract GpuInstructionFusion::IsFusible into gpu_fusible.cc #25842

Merged
merged 9 commits into from Mar 5, 2019

Conversation

sana-damani
Copy link
Contributor

No description provided.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

Googlers can find more info about SignCLA and this PR by following this link.

@sana-damani
Copy link
Contributor Author

I have signed the CLA

thomasjoerg
thomasjoerg previously approved these changes Feb 19, 2019
@rthadur rthadur self-assigned this Feb 19, 2019
@rthadur
Copy link
Contributor

rthadur commented Feb 19, 2019

@sana-damani please sign CLA

@sana-damani
Copy link
Contributor Author

sana-damani commented Feb 19, 2019 via email

Tested using //tensorflow/compiler/xla/service/gpu/tests:gpu_fusion_test and //tensorflow/python/compiler
@sanjoy
Copy link
Contributor

sanjoy commented Feb 21, 2019

@rthadur Any idea what we're waiting on here?

@sana-damani
Copy link
Contributor Author

@rthadur Any idea what we're waiting on here?

Looks like it needs another review before it can be merged. This is likely because I committed a new change before the merge was done.

sanjoy
sanjoy previously approved these changes Feb 21, 2019
@sanjoy
Copy link
Contributor

sanjoy commented Feb 21, 2019

@rthadur I still see the "Need a CLA for one or more commit authors" line even though @sana-damani says they've signed the CLA.

@rthadur
Copy link
Contributor

rthadur commented Feb 21, 2019

@rthadur I still see the "Need a CLA for one or more commit authors" line even though @sana-damani says they've signed the CLA.

@sanjoy i believe there were multiple people who contributed to this PR , @sana-damani do you know if there is one more contributor for this PR ?

@sana-damani
Copy link
Contributor Author

sana-damani commented Feb 21, 2019 via email

@yifeif
Copy link
Contributor

yifeif commented Feb 21, 2019

Hi @sana-damani, did you use the same username and email address for your commits? I see "sdamani" as the username on the commits.

@sana-damani
Copy link
Contributor Author

sana-damani commented Feb 21, 2019 via email

@sana-damani
Copy link
Contributor Author

I have signed the CLA with the updated username

@rthadur rthadur added cla: yes and removed cla: no labels Feb 21, 2019
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@rthadur rthadur added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process size:M CL Change Size: Medium labels Feb 21, 2019
@rthadur rthadur added this to Assigned Reviewer in PR Queue via automation Feb 21, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Feb 21, 2019
@sana-damani
Copy link
Contributor Author

Is the Windows Bazel GPU build failure a real failure? If so, is there a way that I can reproduce and debug this failure?

@sanjoy
Copy link
Contributor

sanjoy commented Feb 27, 2019

I don't think the windows failure is related.

bool IsInputFusible(const HloInstruction& instr) {
// Input fusion only handles non-elemental reduction and scatter operations.
return IsInputFusibleReduction(instr) ||
instr.opcode() == HloOpcode::kScatter;
Copy link
Member

Choose a reason for hiding this comment

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

The function works for unfused Scatter ops but not for existing Scatter input fusions. You want to add something like this.

     (instr.opcode() == HloOpcode::kFusion &&
      instr.fusion_kind() == HloInstruction::FusionKind::kInput &&
      instr.fused_expression_root()->opcode() == HloOpcode::kScatter)

@@ -150,8 +150,7 @@ bool IsLoopFusible(const HloInstruction& instr) {
instr.opcode() == HloOpcode::kConcatenate ||
instr.opcode() == HloOpcode::kDynamicSlice ||
instr.opcode() == HloOpcode::kDynamicUpdateSlice ||
(instr.opcode() == HloOpcode::kFusion &&
instr.fusion_kind() == HloInstruction::FusionKind::kLoop) ||
instr.opcode() == HloOpcode::kFusion ||
Copy link
Member

Choose a reason for hiding this comment

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

Existing input fusions are not loop-fusible, hence we should return false as we did before. Please update IsInputFusible as suggested in my other comment instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about output and custom fusion nodes? Should they also be disallowed from loop fusion?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's a good point. We want to check for FusionKind::kLoop here.

PR Queue automation moved this from Approved by Reviewer to Reviewer Requested Changes Mar 1, 2019
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Mar 1, 2019
@sanjoy sanjoy added cla: yes and removed cla: no labels Mar 1, 2019
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

PR Queue automation moved this from Reviewer Requested Changes to Approved by Reviewer Mar 4, 2019
thomasjoerg
thomasjoerg previously approved these changes Mar 4, 2019
@@ -46,6 +55,10 @@ bool IsReduceInputFusion(const HloInstruction& instr);
// is either an unfused reduction-to-vector op or a reduce input fusion.
bool IsInputFusibleReduction(const HloInstruction& instr);

// Whether `instr` is fusible as root of a reduce input fusions, i.e. `instr`
Copy link
Member

Choose a reason for hiding this comment

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

Please replace "reduce" with "scatter".

PR Queue automation moved this from Approved by Reviewer to Reviewer Requested Changes Mar 4, 2019
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Mar 4, 2019
@sanjoy sanjoy added cla: yes and removed cla: no labels Mar 4, 2019
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

PR Queue automation moved this from Reviewer Requested Changes to Approved by Reviewer Mar 5, 2019
pull bot pushed a commit to Rachelmorrell/tensorflow that referenced this pull request Mar 5, 2019
@tensorflow-copybara tensorflow-copybara merged commit aea1596 into tensorflow:master Mar 5, 2019
PR Queue automation moved this from Approved by Reviewer to Merged Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull PR ready for merge process size:M CL Change Size: Medium
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

8 participants