Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

add a few lowerings #968

Merged
merged 2 commits into from
Aug 23, 2022
Merged

add a few lowerings #968

merged 2 commits into from
Aug 23, 2022

Conversation

eellison
Copy link
Contributor

  • Add lowering for prims.flip (this gets lowered to from aten.flip.default which shows up a lot in huggingface)
  • Enable aten.tril.default decomp
  • Remove rsqrt decomp to lower to intrinsic

aten.rsqrt.default (fp16) (20th/50th/80th percentile)
Before : [0.901 0.907, 0.966] / After : [0.966, 0.970, 0.975]

aten.flip.default speedup: [1.0219, 1.045, 1.068]

aten.tril.default speedup: [1.116, 1.116, 1.116]

Copy link

@ngimel ngimel left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@desertfire
Copy link
Contributor

Before : [0.901 0.907, 0.966] / After : [0.966, 0.970, 0.975], does this mean rsqrt becomes slower?

@desertfire
Copy link
Contributor

Before : [0.901 0.907, 0.966] / After : [0.966, 0.970, 0.975], does this mean rsqrt becomes slower?

NVM, it's speedup.

@eellison eellison merged commit ea455b7 into pytorch:main Aug 23, 2022
eellison added a commit to eellison/torchdynamo that referenced this pull request Aug 23, 2022
jansel pushed a commit that referenced this pull request Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants