-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[AutoDiff] Underscore the Differentiable protocol.
#27577
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
[AutoDiff] Underscore the Differentiable protocol.
#27577
Conversation
Rename `Differentiable` protocol to `_Differentiable`.
Differentiable protocol.Differentiable protocol.
|
@swift-ci Please test tensorflow |
|
Is the protocol still compiled into the standard library when autodifferentiation is not enabled? |
Yes - I wonder if that is an issue? Perhaps we can continue discussion on the upstreaming-to-master PR #27511. Context: we've only merged one upstreaming-to-master PR (#27446), which adds an We chose a frontend flag rather than a |
|
It would be nice to make compiling these things into the standard library conditional until they're officially accepted as standard. We don't want to accidentally release incomplete versions of them as ABI. That doesn't have to happen in this PR specifically, but I think it should be part of the upstreaming work you all are doing. |
|
And to be clear, if it's more convenient to you all to have these things compiled in by default, I don't have a strong opinion on whether the build condition enables or disables building autodiff-related standard library code in as the default setting. I'm mostly concerned that we be able to leave them out of our official submissions. |
|
We can add a I see the concern with stdlib ABI. The only thing that we currently need in the standard library is the At some point, we will need to add derivatives for stdlib floating point APIs, which I think can be added with I think making this |
|
@swift-ci Please test tensorflow |
|
Per discussion, we will add an The flag will be added before #27511 upstreams the |
Rename the
Differentiableprotocol to_Differentiable.This matches upstreaming PR #27511, which adds
protocol _Differentiablein a newDifferentiable.swiftfile.tensorflowbranch definestypealias Differentiable = _Differentiablefor usability. There should be no user-facing changes, except that some error messages now show'_Differentiable'instead of'Differentiable'.