fix: Resolve compilation bug for empty tensors in aten::select by gs-olive · Pull Request #1623 · pytorch/TensorRT (original) (raw)
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
squeezeDimsregardinguse_zerosargument - Add optional argument to
squeezeDimsto 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
squeezeDimsregardinguse_zerosargument - Add optional argument to
squeezeDimsto 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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM