New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
pstrf
on positive semi-definite matrices
#12435
Comments
I think |
Interesting. However, it does not seem to work with a Rank-1, 2x2 matrix, unless I misunderstood your point.
|
Oh, my bad. I thought that was the case. I will look into it in more detail. |
I looked into it further, and there's nothing interfering with the LAPACK calls for I also found out that |
The matrix is rank deficient, which is correct, but the error message is indeed confusing. Maybe we should just make it say that the matrix is not positive definite (this is what scipy.linalg.cholesky says) |
|
Further more, do we need to have a function with only an implementation for the CPU. I think that would be inconvenient. |
Pytorch no longer has pstrf function. Labeling this for linalg in case we need to add support. |
Same as with the other issue, I think LDL provides a good enough solution for this. cc @IvanYashchuk |
馃悰 Bug
pstrf
does not work on Positive Semi-Definite matrices while the documentation says it should.The issue might be a misunderstanding on my part of the documentation.
Any correction to this misunderstanding is welcome :)
I am assuming that for
M
to be a Positive SemiDefinite matrix, it needs to hold that for any real vectorx
,x.t() @ M @ x >= 0
,whereas to be Positive Definite, it needs to hold that
x.t() @ M @ x > 0
.To Reproduce
Using Pytorch 0.4.1, on CPU
throws
Expected behavior
pstrf
is supposed toIn the example provided above, I would expected
u
should be[[0]]
andpiv
should be[0]
Additional Details
I don't understand the error message,
From my understanding, Positive SemiDefinite matrices that are not Positive Definite are by definition rank deficient.
cc @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk
The text was updated successfully, but these errors were encountered: