pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Rethink the special-case for Elemwise/Blockwise InplaceOptimizer for "large graphs"

Open ricardoV94 opened this issue 5 months ago • 2 comments

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:

  1. Remove this behavior and address underlying performance issues (if we can reproduce)
  2. Make it a config variable
  3. Make it more cleaver, not just scalar, but perhaps variable.size if that's statically known as well

ricardoV94 avatar Jul 02 '25 09:07 ricardoV94

I think it should be a config value

jessegrabowski avatar Jul 10 '25 02:07 jessegrabowski

I am thinking whether we need that in the first place

ricardoV94 avatar Jul 10 '25 09:07 ricardoV94