-
Notifications
You must be signed in to change notification settings - Fork 135
Propagate static output shapes in Split and avoid copy in C-impl #1343
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
Conversation
aa9b281
to
4331934
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (88.57%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1343 +/- ##
=======================================
Coverage 82.01% 82.01%
=======================================
Files 203 203
Lines 48798 48813 +15
Branches 8685 8688 +3
=======================================
+ Hits 40022 40035 +13
- Misses 6625 6627 +2
Partials 2151 2151
🚀 New features to boost your workflow:
|
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.
Some rinky-dink feedback. I'm not qualified to comment on the C code, but I tried my best.
This makes Split (which shows up in the gradient of Join) much faster as it doesn't do useless copies.
I see a speedup of ~10x, obviously the comparison would scale with the ammount of copying that is now avoided
Also added static output shape and cleanup other methods of Split
📚 Documentation preview 📚: https://pytensor--1343.org.readthedocs.build/en/1343/