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

fix: Bugfix in convNd_to_convolution lowering pass #1693

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

gs-olive
Copy link
Collaborator

Description

  • Lowering pass did not respect prim::If block boundaries
  • Refactor convNd implementation to use more precise guard-insert paradigm instead of subgraph rewriting
  • Write general function to apply for all convolution replacements
  • When replacing a subgraph that occurs within an "If" block, the rewriter places the actual logic of the code outside of the block, so the rewrite makes the code execute both the "if" and the "else" path regardless of what the condition is
  • Add regression test case to validate refactoring on aten::conv1d

Addresses first bug in #1597

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

- Lowering pass did not respect `prim::If` block boundaries
- Refactor convNd implementation to use more precise guard-insert
paradigm instead of subgraph rewriting
- Write general function to apply for all convolution replacements
- When replacing a subgraph that occurs within an "If" block,
the rewriter places the actual logic of the code outside of the block,
so the rewrite makes the code execute both the "if" and the "else" path
regardless of what the condition is
- Add a test case to validate refactoring on conv1d
@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 Feb 22, 2023
@gs-olive gs-olive self-assigned this Feb 22, 2023
- Partitioning test incorrectly expected 1 conditional engine, but got 2
since `log_sigmoid` operator is not currently supported
@peri044 peri044 merged commit 2ea9f00 into pytorch:main Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: core Issues re: The core compiler 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.

None yet

3 participants