Skip to content

Update Eigh and Eigvalsh Ops#2059

Merged
jessegrabowski merged 5 commits into
v3from
eigh-modernization
Apr 26, 2026
Merged

Update Eigh and Eigvalsh Ops#2059
jessegrabowski merged 5 commits into
v3from
eigh-modernization

Conversation

@jessegrabowski
Copy link
Copy Markdown
Member

  • Make Eigh and Eigvalsh fully symbolic
  • Deprecate UPLO argument in favor of lower (matches API of other linalg ops)
  • Add numba dispatch to underlying LAPACK routines for generalized eigenvalue and complex support

This is another in my "decompositions nobody asked for" series. Actually this one is useful, eigh/eigvalsh get used here and there in logp of multivariate normal, see here for example. Now the generalized problem I have no idea :) But I was sick of looking at the separate Grad ops that were doing nothing special at all.

@jessegrabowski
Copy link
Copy Markdown
Member Author

Tests will fail until #2054 is merged.

Comment thread pytensor/link/numba/dispatch/linalg/decomposition/dispatch.py
Copy link
Copy Markdown
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test is failing though

Comment thread pytensor/tensor/linalg/decomposition/eigen.py Outdated
@jessegrabowski
Copy link
Copy Markdown
Member Author

Can't reproduce the test failure on my mac, i think there's some lapack difference thing going on. Will keep trying.

@ricardoV94
Copy link
Copy Markdown
Member

try to nuke the cache pytensor-cache clear. May be due to wrong cache / ordering or numpy/scipy differences

@jessegrabowski jessegrabowski merged commit a7da5bf into v3 Apr 26, 2026
66 checks passed
@jessegrabowski jessegrabowski deleted the eigh-modernization branch April 26, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request linalg Linear algebra numba Op implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants