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

Work around world age error for Duals in exp_generic #43

Closed
wants to merge 3 commits into from

Conversation

andreasnoack
Copy link
Contributor

and fix exp_generic(0.0).

Closes #42 but not really #41. It's more a temporary workaround than an actual fix. I'm not sure how to fix the problem in full generality.

generated functions that causes world age errors in exp_pade_p
if the function has been called before ForwardDiff was loaded.
@andreasnoack
Copy link
Contributor Author

Please hold off a bit. I need to define the zero branch differently since

julia> ForwardDiff.derivative(exp_generic, 0.0)
0.0

@andreasnoack
Copy link
Contributor Author

Fixed it so I believe this one should be good to go.

N = randn(n, n)
@test exp(N) ≈ exp_generic(N)

exp(n) ≈ exp_generic(n)
end
end

# The issue was only triggered if exp_generic had been called before loading
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be incorrect. What matters is the load order, while it's a bug if the call order is observable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how'd you find this? 😆 I think we can just straight avoid the issue for the most common case (#45) and handle the more general thing later.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone put out the bat signal 🙃

@andreasnoack
Copy link
Contributor Author

Superseded by #45

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

Successfully merging this pull request may close these issues.

generic_exp fails in zero
3 participants