pytensor
pytensor copied to clipboard
Rethink the special-case for Elemwise/Blockwise InplaceOptimizer for "large graphs"
Description
As brought up in #1494 it's odd to have a hard-coded 500 number at which we stop trying to inplace scalar graphs. We could consider:
- Remove this behavior and address underlying performance issues (if we can reproduce)
- Make it a config variable
- Make it more cleaver, not just scalar, but perhaps variable.size if that's statically known as well
I think it should be a config value
I am thinking whether we need that in the first place