-
Notifications
You must be signed in to change notification settings - Fork 134
Allow broadcasting in specialized numba dispatch of AdvancedIncSubtensor
#1272
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
Allow broadcasting in specialized numba dispatch of AdvancedIncSubtensor
#1272
Conversation
bcb9ebd
to
ec81f12
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (95.34%) 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 #1272 +/- ##
=======================================
Coverage 81.99% 82.00%
=======================================
Files 188 188
Lines 48608 48617 +9
Branches 8688 8690 +2
=======================================
+ Hits 39857 39866 +9
Misses 6586 6586
Partials 2165 2165
🚀 New features to boost your workflow:
|
True, | ||
True, | ||
False, | ||
False, |
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.
Can we concoct a new test case that still requires object on both inc and set? Or is the coverage now that good?
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.
There are 3 such tests already:
pytensor/tests/link/numba/test_subtensor.py
Lines 398 to 417 in ec81f12
( | |
np.arange(3 * 4 * 5).reshape((3, 4, 5)), | |
rng.poisson(size=(2, 4)), | |
([1, 2], slice(None), [3, 4]), # Non-consecutive vector indices | |
False, | |
True, | |
True, | |
), | |
( | |
np.arange(3 * 4 * 5).reshape((3, 4, 5)), | |
rng.poisson(size=(2, 2)), | |
( | |
slice(1, None), | |
[1, 2], | |
[3, 4], | |
), # Mixed double vector index and basic index | |
False, | |
True, | |
True, | |
), |
pytensor/tests/link/numba/test_subtensor.py
Lines 435 to 441 in ec81f12
np.arange(3 * 5).reshape((3, 5)), | |
rng.poisson(size=(1, 2, 2)), # Same as before, but Y broadcasts | |
(slice(1, 3), [[1, 2], [2, 3]]), | |
False, | |
True, | |
True, | |
), |
Either when array indexes are non-consecutive, or mixed with basic indices
AdvancedIncSubtensor
📚 Documentation preview 📚: https://pytensor--1272.org.readthedocs.build/en/1272/