-
Notifications
You must be signed in to change notification settings - Fork 69
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
Autodiff for A -> A * A'
does not give hermitian result for complex A
#1456
Comments
A -> A * A'
does not give hermitian result for complex A
A -> A * A'
does not give hermitian result for complex A
Looks like its hermition up to floating point-level precision.
Per the warning
this is known that the implementation of zgemm will be replaced by a different implementation, that apparently here results in some numeric differences within a reasonable tolerance. |
I actually think the behavior here is reasonable, and the test utils properly only check within a tolerance. @simsurace is there a reason why this is problematic? |
Ah, makes sense. What is needed to not have to rely on these fallbacks? At least for forward mode, what is the reason for not just calling the same function that is being passed? I understand that there must be a fallback to generate LLVM from to then compute the derivative, but the primal could still use the non-fallback or would that lead to problems? Of course one can work around those but the composition of this function with something relying on the intermediate result being hermitian currently fails. |
So now for forward mode you don't have it for complex, but for reals it won't use the fallback now |
This was found while writing tests for #1307, where the function below is composed with
cholesky
:So somehow the forward mode does not produce the same result as the function for
square
, but this is not caught by EnzymeTestUtils.Something similar for reverse mode
The text was updated successfully, but these errors were encountered: