-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff upstream] add @noDerivative to AnyFunctionType params #28278
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
Conversation
The name |
Well, that isn't right either, because it is possible differentiable but you don't want it in this case - better names still desired :) |
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 LGTM, but the name @nondiff isn't great. For the time being, I'd suggest going with @nondifferentiable
to align with the name inside of the compiler unless there is a better suggestion.
I discussed the naming with @dan-zheng, and we think that
It's already named cc @rxwei for opinions. I'll wait a bit to see if anyone disagrees before I make the code changes. |
I think we should use |
I have renamed this to |
@swift-ci please test |
1 similar comment
@swift-ci please test |
+1 for |
We agreed to move to rename `@nondiff` to `@noDerivative` (in line with the `@noDerivative` declaration attribute) in #28278.
I have resolved merge conflicts, and I plan to do a test and merge soon. |
9360f60
to
72194c5
Compare
@swift-ci please test and merge |
1 similar comment
@swift-ci please test and merge |
Cherry-picks #28278 to `tensorflow` branch. `@nondiff` exists with a deprecation warning.
Adds the
@noDerivative
attribute toAnyFunctionType
parameters.This attribute is used to determine which parameters a differentiable function type is differentiable with respect to, e.g.
@differentiable (Float, @noDerivative Float) -> Float
is only differentiable with respect to its first parameter.Also adds serialization for the attribute.
This resolves TF-870.