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: Resolve compilation bug for empty tensors in aten::select #1623

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

gs-olive
Copy link
Collaborator

Description

  • Add function to utilities to validate input dimensions to Shuffle layers, returning the number of zero dimensions in the input (indicative of empty tensors)
  • Improve input validation and handling of dynamic shapes in aten::select
  • Fix bug in usage of squeezeDims regarding use_zeros argument
  • Add optional argument to squeezeDims to swap 0 and -1, as needed per the input specification
  • Add regression test case to elicit bug
  • Add test utility to compare shapes of two input tensors

Fixes #1616 [When applied with #1619]
Fixes #1622

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

- Add function to utilities to validate input dimensions to Shuffle
layers, returning the number of zero dimensions in the input (indicative
of empty tensors)
- Improve input validation and handling of dynamic shapes in
`aten::select`
- Fix bug in usage of `squeezeDims` regarding `use_zeros` argument
- Add optional argument to `squeezeDims` to swap 0 and -1, as needed per
the input specification
- Add regression test case to elicit bug
- Add test utility to compare shapes of two input tensors
@gs-olive gs-olive requested a review from peri044 January 27, 2023 02:09
@gs-olive gs-olive self-assigned this Jan 27, 2023
@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: tests Issues re: Tests labels Jan 27, 2023
@narendasan narendasan removed the request for review from peri044 January 31, 2023 01:50
Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

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

LGTM

@narendasan narendasan merged commit 8eb2eab into pytorch:main Feb 1, 2023
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: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] Reshaping Empty Tensors Causes Compilation Crash 🐛 [Bug] Model Decoder Failure
3 participants