-
Notifications
You must be signed in to change notification settings - Fork 449
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
Simplify Tensor::unsqueeze_dims(); improve handling of negative indicies. #2572
base: main
Are you sure you want to change the base?
Simplify Tensor::unsqueeze_dims(); improve handling of negative indicies. #2572
Conversation
Independently re-discovered the unsqueeze bug fixed on HEAD at: tracel-ai@f8c845d This PR makes the tests more aggressive for negative offsets greater than -1; and accumulation of negative offsets.
|
There was a previous PR to try and address this, but it didn't handle |
@laggui this hits your previous PR; I'll try and work a fix up later tonight. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2572 +/- ##
==========================================
- Coverage 81.86% 81.86% -0.01%
==========================================
Files 833 833
Lines 106465 106459 -6
==========================================
- Hits 87162 87156 -6
Misses 19303 19303 ☔ View full report in Codecov by Sentry. |
I recognize that my limited understanding of the api means that the previous versions of the test were broken (setting the wrong target dim count); but they still showed a problem when that was fixed. This PR works cleanly with the new test; and the simplified logic has fewer cases |
Checklist
run-checks all
script has been executed.Related Issues/PRs
f8c845d
Changes
Independently re-discovered the unsqueeze bug fixed on HEAD at: f8c845d
This PR makes the tests more aggressive for negative offsets greater than -1; and accumulation of negative offsets.