Skip to content
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

sincos errors for ComplexF64 forward-mode #855

Closed
sethaxen opened this issue May 17, 2023 · 2 comments
Closed

sincos errors for ComplexF64 forward-mode #855

sethaxen opened this issue May 17, 2023 · 2 comments

Comments

@sethaxen
Copy link
Collaborator

When the argument type is ComplexF64, forward-mode autodiff raises an error:

using Enzyme

x, ∂x = randn(ComplexF64, 2)
autodiff(Forward, sincos, Duplicated, Duplicated(x, ∂x))

dump.txt

@vchuravy
Copy link
Member

Looks like it is missing a custom rule for cos we end up in flipsign and that does bit twiddling

@wsmoses
Copy link
Member

wsmoses commented May 21, 2023

Yeah simply autodiff(Forward, cos, Duplicated, Duplicated(x, ∂x)) fails.

Interestingly sin(complex) doesn't have the flipsign call inside that cos(complex) does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants