pytorch
a47bc96f - [composite compliance] fix linalg.eigvals (#84137)

Commit
2 years ago
[composite compliance] fix linalg.eigvals (#84137) linalg.eigvals fails in some cases with functorch and the root of the problem is that it is not composite compliant. In particular, checks that branch on whether or not a Tensor requires grad do not work with functorch. In order to support functorch with them, we have to include an additional "if the tensor is a Tensor Subclass, then assume that it MAY require grad, so we must always go through the differentiable path". This PR also changes the batching rule for linalg.eigvals to be a decomposition instead of what it was previously. What it was previously was masking the error in functorch's test suite. Unfortunately we don't comprehensive tests for this on the functorch side which is why this was not caught before. I'll look into why that is in the future; it's a bit complicated. Test Plan: - wait for tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/84137 Approved by: https://github.com/Lezcano, https://github.com/IvanYashchuk, https://github.com/samdow
Author
Committer
Parents
Loading