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

feat: Rsqrt lowering pass #1394

Merged
merged 2 commits into from
Oct 12, 2022
Merged

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Oct 7, 2022

Description

This feature adds a lowering pass to convert rsqrt to its component functions.

Fixes #1333

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [ x ] My code follows the style guidelines of this project (You can use the linters)
  • [ x ] I have performed a self-review of my own code
  • [ x ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ x ] I have made corresponding changes to the documentation
  • [ x ] I have added tests to verify my fix or my feature
  • [ x ] New and existing unit tests pass locally with my changes
  • [ x ] I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions bot added component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests labels Oct 7, 2022
Comment on lines +17 to +18
%intermediate: Tensor = aten::sqrt(%1)
%out: Tensor = aten::reciprocal(%intermediate)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Want to verify there are no type-casting or other concerns with the order being $\frac{1}{\sqrt{x}}$ instead of $\sqrt{\frac{1}{x}}$

@narendasan
Copy link
Collaborator

@gs-olive can you rebase?

@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters documentation Improvements or additions to documentation labels Oct 11, 2022
@gs-olive gs-olive closed this Oct 11, 2022
@gs-olive gs-olive deleted the rsqrt_converter branch October 11, 2022 22:50
@gs-olive gs-olive restored the rsqrt_converter branch October 11, 2022 23:09
@gs-olive gs-olive reopened this Oct 11, 2022
- Add unpack rsqrt lowering pass
- Add test cases for positive inputs, int and float
- Add references to new function in headers and BUILD files
@narendasan narendasan marked this pull request as ready for review October 12, 2022 16:29
@narendasan narendasan merged commit 85e5e99 into pytorch:master Oct 12, 2022
@gs-olive gs-olive deleted the rsqrt_converter branch October 12, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Converter] Request implementation aten::rsqrt(Tensor self) -> (Tensor) in Torch-TensorRT
3 participants