-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Project nothing
to nothing
#1075
Conversation
This is likely to break some tests, but seems like the cogent thing to do for some cases. |
I am not sure if this is the right place for this fix. @mcabbott should review. |
Since |
src/compiler/chainrules.jl
Outdated
@@ -106,6 +106,7 @@ Convert `x` from the differentials types ChainRules uses to the format Zygote us | |||
# Zygote convention: even if many AbstractZero partials (i.e. multi-input function), make just 1 nothing. | |||
@inline wrap_chainrules_output(x::Tuple{Vararg{ChainRules.AbstractZero}}) = nothing | |||
@inline wrap_chainrules_output(x::ChainRules.AbstractZero) = nothing | |||
@inlint wrap_chainrules_output(x::ChainRules.NoTangent) = nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems completely safe to me. Although might be covered by the AbstractZero
line above?
Re PR's original change c53df99 to propagate nothings, I was surprised this broke no tests. I don't recall now what test motivated that method in the first place, and it's possible that some later change removed the need.
Does this solve SciML/SciMLSensitivity.jl#493? As noted there, I can't reproduce this locally.
ref SciML/SciMLSensitivity.jl#493 (comment) I believe we have the |
closing as stale, possibly also not needed anymore |
Ref SciML/SciMLSensitivity.jl#493