-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error with QuadGK 2.11 and Zygote #117
Comments
We might have to add a custom ChainRule, since I can't eliminate the new using ChainRulesCore
@non_differentiable QuadGK.cachedrule(Any...) to prevent Zygote from trying to differentiate through that function (which in fact is not differentiable, nor is it necessary for the derivative, so Zygote is just wasting effort with it). You could also use QuadGK via Integrals.jl, which has custom chain rules already. (It would be good for us to add a custom ChainRule anyway, since the new |
Thansks a lot for quick response! Your suggestion with flagging the problematic function as non-differentiable works for me. |
Re-opening because this should ideally be fixed in QuadGK. |
Hi,
I maintain a Julia package for Monte Carlo simulation in the finance domain. We use QuadGK in conjunction with Zygote.
The new QuadGK 2.11 seems to cause the following error: Compiling Tuple{typeof(QuadGK.cachedrule), Type{Float64}, Int64}: try/catch is not supported. See also
https://github.com/frame-consulting/DiffFusion.jl/actions/runs/10649757211/job/29520331450
It all worked well with earlier versions of QuadGK.
Any chance you could have a look and fix it?
The text was updated successfully, but these errors were encountered: