-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Float16 input now gives Float 16 factors for svd,eigen and cholesky. #41352
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dkarrasch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I would write out Float16 instead of using T <: Float16, and make use of conversion functions that already exist. eigen requires a bit more "hacky" work, unfortunately.
Co-authored-by: Daniel Karrasch <[email protected]>
|
For SVD, I think we want to be more permissive and allow both real and complex Float16 eltypes. So you should indeed use the |
Co-authored-by: Daniel Karrasch <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
|
would the coverter for I am probably missing out on something as it is not yet working. |
Yes, but |
|
I don't see anything about those fields in the documentation but the code surely does have them. An example would be helpful to get an insight. |
|
Oh, I just checked. |
|
Yes, that is true because of how the default values for the optional arguments are set. But now check in all cases (including real symmetric, complex hermitian), if the values of those fields are equal to the values of the |
|
I see, with default values, it's obvious for them to return as |
Co-authored-by: Daniel Karrasch <[email protected]>
|
Finally, I suggest the following test pattern: A = ...
B = somefactorization(Float16.(A))
B32 = somefactorization(Float32.(A))
# now the tests that you already have
@test B.somefield ≈ B32.somefield
# for all fieldsThis should make sure that also the values are as desired, not only the types. |
|
Ah, I don't think the changes you suggested are working for Real matrix with Complex eigenvalues. |
Co-authored-by: Daniel Karrasch <[email protected]>
|
Are we okay with not changing condition numbers to |
Hm, I don't think leaving it as |
It's working fine at least for now with the examples I have taken. I have converted them to |
|
Good to merge? Also I am wondering if we can use conditional operators as you suggested in the eigen method for type converter? That should cover all the cases I guess. |
Co-authored-by: Fredrik Bagge Carlson <[email protected]>
…uliaLang#41352) Co-authored-by: Daniel Karrasch <[email protected]> Co-authored-by: Fredrik Bagge Carlson <[email protected]>
Closes JuliaLang/LinearAlgebra.jl#330.