pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

ENH: Add destructive rewrites for Cholesky `Op`

Open jessegrabowski opened this issue 1 year ago • 0 comments

Before

No response

After

No response

Context for the issue:

Currently, the Cholesky Op does not act in-place. This is a known problem since the Theano days (see comment here). We should:

  1. Add a rewrite that will set destructive=True to cholesky nodes,
  2. Add a destroy_map to Cholesky nodes
  3. Register the rewrite somewhere after the specialization step (this is done by other destructive rewrites, e.g. for GEMV.

If anyone knows other linear algebra Ops that are not acting in-place, this issue could also collect those (SolveTriangular?)

jessegrabowski avatar Jan 05 '24 12:01 jessegrabowski