-
Notifications
You must be signed in to change notification settings - Fork 446
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
Feat: Add movedim
tensor operator
#1876
Conversation
Introduce movedim function to allow dimension reordering in tensors. Enhance flexibility by supporting various argument types for dimension specification. Add necessary checks to validate dimensions.
…r consistency and simplify type handling
…ve insertion order lol
This reverts commit d2cf4e3.
…entation ✅ (movedim.rs): add test for out-of-bound axis on vec input
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1876 +/- ##
==========================================
- Coverage 86.28% 86.19% -0.10%
==========================================
Files 774 779 +5
Lines 90095 91179 +1084
==========================================
+ Hits 77740 78588 +848
- Misses 12355 12591 +236 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
…rray ♻️ (check.rs): remove hashbrown::HashSet dependency and replace with nested loops for duplicate check
Thanks for the review! I have addressed your comments in recent commit |
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
None
Changes
Added
movedim
default implementation. Mirrors the PyTorch one.This just wraps a call to permute with sanity checks, but moving one/few axes while keeping all others inbound is a common enough operation to warrant its specific convenient syntactic sugar.
Testing
Added unit tests.