pytensor
pytensor copied to clipboard
Remove restrictive broadcastability check in `local_blockwise_alloc`
Description
This is very similar in flavor to #742
I'm a bit weary of the fact broadcastability can be redefined by our rewrites, specially after user graph manipulations, because it can mean some graphs may allow broadcasting depending on whether certain rewrites happen or not, and these should be static!
I think the proper solution will come through #408, so that we can both know something has shape 1 and is or is not allowed to broadcast
Related Issue
- [ ] Closes #
- [ ] Related to #
Checklist
- [x] Checked that the pre-commit linting/style checks pass
- [x] Included tests that prove the fix is effective or that the new feature works
- [x] Added necessary documentation (docstrings and/or example notebooks)
- [x] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [ ] New feature / enhancement
- [ ] Bug fix
- [ ] Documentation
- [x] Maintenance
- [ ] Other (please specify):