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

arraymath muladd frule has too loose types #727

Closed
Keno opened this issue Jul 9, 2023 · 0 comments · Fixed by #728
Closed

arraymath muladd frule has too loose types #727

Keno opened this issue Jul 9, 2023 · 0 comments · Fixed by #728
Assignees

Comments

@Keno
Copy link
Contributor

Keno commented Jul 9, 2023

The frule here:

function frule((_, ΔA, ΔB, Δz), ::typeof(muladd), A, B, z)
Ω = muladd(A, B, z)
return Ω, ΔA * B .+ A * ΔB .+ Δz
end

is Any typed. This is in general undesirable, because an frule this wide may be worse than the frule that would have been generated using AD recursion. In particular, this rule catches ChainRulesCore's methods for muladd on ZeroTangent which would otherwise have been trivial. I'd be good to narrow these types.

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 a pull request may close this issue.

2 participants