Skip to content

Conversation

@jessegrabowski
Copy link
Member

@jessegrabowski jessegrabowski commented Jun 21, 2025

Description

There was some discussion in #1467 about whether the reuse_decomposition_multiple_solves rewrite was doing the right thing with the lower flags, especially in the corner case where a user is being really clever and only storing half the symmetric matrix.

This PR handles the case more carefully, and checks on a matrix with NaN values that we don't look at the wrong triangles after rewriting.

It also forwards the check_finite argument in the Cholesky Op, which was not being respected previously. I think this is also being fixed in #1487 , so there's some undesirable overlap between these PRs.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pytensor--1492.org.readthedocs.build/en/1492/

@jessegrabowski jessegrabowski added bug Something isn't working graph rewriting linalg Linear algebra labels Jun 21, 2025
@jessegrabowski jessegrabowski force-pushed the more-cho-solve-rewrite branch 2 times, most recently from b41cfc7 to 35444df Compare June 21, 2025 19:52
@jessegrabowski
Copy link
Member Author

jessegrabowski commented Jun 21, 2025

I reset the logic of the rewrite in this PR, but added a test of behavior under different lower flags. I think we were doing the right thing from the get-go, but we might have to think about this a bit more carefully.

Even if everything is fine, I think having this new test is good.

@jessegrabowski jessegrabowski force-pushed the more-cho-solve-rewrite branch from 7aa255d to 025c025 Compare June 23, 2025 13:30
@ricardoV94
Copy link
Member

Shall we close this?

@jessegrabowski
Copy link
Member Author

jessegrabowski commented Jul 25, 2025

Yes, we resolved it (or maybe it was never a problem)

@jessegrabowski jessegrabowski deleted the more-cho-solve-rewrite branch September 30, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working graph rewriting linalg Linear algebra

2 participants