Skip to content

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
@zewenli98 zewenli98 requested a review from gs-olive October 23, 2023 21:22
Copy link
Contributor

@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 zewenli98 requested a review from gs-olive October 24, 2023 22:47
@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
Contributor

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

@zewenli98 zewenli98 force-pushed the aten.linear_lowering_pass branch from 43b5795 to 1d5b9d0 Compare November 2, 2023 00:46
Copy link
Contributor

@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
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