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] Extend the Algebraic Simplifier to convert Pow(x, 3) -> x*x*x. #41631

Merged

Conversation

nouiz
Copy link
Contributor

@nouiz nouiz commented Jul 22, 2020

2 multiplication is faster then the full pow implementation.
This also make the GELU kernel vectorized.

This pattern happen in GELU in BERT. Now it only takes 81 us instead of the original 208 us on a V100.

@thomasjoerg

@google-ml-butler google-ml-butler bot added the size:S CL Change Size: Small label Jul 22, 2020
@gbaned gbaned self-assigned this Jul 22, 2020
@gbaned gbaned added the comp:xla XLA label Jul 22, 2020
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Jul 22, 2020
@gbaned gbaned requested a review from thomasjoerg July 22, 2020 15:37
@joker-eph joker-eph removed their request for review July 22, 2020 16:14
thomasjoerg
thomasjoerg previously approved these changes Jul 23, 2020
tensorflow/compiler/xla/service/algebraic_simplifier.cc Outdated Show resolved Hide resolved
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Jul 23, 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 Jul 23, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 23, 2020
PR Queue automation moved this from Approved by Reviewer to Reviewer Requested Changes Jul 23, 2020
@google-ml-butler google-ml-butler bot removed the ready to pull PR ready for merge process label Jul 23, 2020
@gbaned gbaned requested a review from thomasjoerg July 23, 2020 13:09
PR Queue automation moved this from Reviewer Requested Changes to Approved by Reviewer Jul 23, 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 Jul 23, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 23, 2020
@tensorflow-copybara tensorflow-copybara merged commit 55c1276 into tensorflow:master Jul 24, 2020
PR Queue automation moved this from Approved by Reviewer to Merged Jul 24, 2020
@nouiz nouiz deleted the upstream_master_tf2_pow3 branch September 27, 2021 19:14
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

6 participants