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: a lowering pass to re-compose ops into aten.linear #2411

Merged
merged 5 commits into from
Nov 9, 2023

Conversation

zewenli98
Copy link
Collaborator

Description

A lowering pass to re-compose ops into aten.linear.

A discussion about why we need this lowering pass can be found here: #2296

Fixes #2398

Type of change

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

Checklist:

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

@github-actions github-actions bot added component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests labels Oct 23, 2023
@github-actions github-actions bot requested a review from peri044 October 23, 2023 21:21
Copy link
Collaborator

@gs-olive gs-olive left a comment

Choose a reason for hiding this comment

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

Added comments detailing suggested improvements. Overall the design looks good!

@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters labels Oct 24, 2023
@zewenli98
Copy link
Collaborator Author

@gs-olive Thanks for your review and constructive comments. I have addressed all the issues above. Please take a look when you get the chance. Thanks a lot!

@zewenli98
Copy link
Collaborator Author

@gs-olive Can we merge into the main branch if everything looks good?

@gs-olive
Copy link
Collaborator

@zewenli98 - this one looks good, but would like to wait until later this week to merge this particular change

Copy link
Collaborator

@gs-olive gs-olive left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@zewenli98 zewenli98 merged commit da90d61 into pytorch:main Nov 9, 2023
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨[Feature] Writing a lowering pass to re-compose ops into aten.linear
3 participants