-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[AutoDiff] [stdlib] Switch to '@differentiating' as much as possible. #23193
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
@swift-ci please test tensorflow |
dan-zheng
approved these changes
Mar 9, 2019
`@differentiable(vjp: ...)` will be deprecated as soon as we support parameter selection and generic constraints with retroactive derivative registration (`@differentiating(...)`).
Contributor
Author
|
@swift-ci please test tensorflow |
Contributor
Author
|
Aha, right, this thing didn't have libSyntax support yet. |
Contributor
Contributor
|
@swift-ci Please test tensorflow |
Contributor
|
Working on the final fix for things to compile! |
Contributor
|
@swift-ci Please test tensorflow |
dan-zheng
added a commit
to dan-zheng/swift
that referenced
this pull request
Mar 20, 2019
Update derivative name in `@differentiable` attribute when a derivative
function is set. This prevents linker errors.
Disable serialization for `@differentiable` attribute. It is unnecessary:
- Currently, type-checking sets the derivative in a `@differentiable` attribute
on the original function, which is serialized.
- If both `@differentiable` and `@differentiating` are serializable, using
`@differentiating` attribute causes an infinite loop occurs during
deserialization.
- In the future, `@differentiating` attribute will be lowered to SIL
differentiability witness tables, which will be serialized.
Unblocks swiftlang#23193: using `@differentiating` attribute in the stdlib.
dan-zheng
added a commit
that referenced
this pull request
Mar 20, 2019
Update derivative name in `@differentiable` attribute when a derivative
function is set. This prevents linker errors.
Disable serialization for `@differentiable` attribute. It is unnecessary:
- Currently, type-checking sets the derivative in a `@differentiable` attribute
on the original function, which is serialized.
- If both `@differentiable` and `@differentiating` are serializable, using
`@differentiating` attribute causes an infinite loop occurs during
deserialization.
- In the future, `@differentiating` attribute will be lowered to SIL
differentiability witness tables, which will be serialized.
Unblocks #23193: using `@differentiating` attribute in the stdlib.
3bfca62 to
fd58780
Compare
fd58780 to
9fdeed2
Compare
Contributor
|
@swift-ci Please test tensorflow |
Contributor
|
@swift-ci Please test tensorflow linux |
Contributor
Author
|
Exciting! |
rxwei
pushed a commit
to rxwei/swift
that referenced
this pull request
May 11, 2019
Update derivative name in `@differentiable` attribute when a derivative
function is set. This prevents linker errors.
Disable serialization for `@differentiable` attribute. It is unnecessary:
- Currently, type-checking sets the derivative in a `@differentiable` attribute
on the original function, which is serialized.
- If both `@differentiable` and `@differentiating` are serializable, using
`@differentiating` attribute causes an infinite loop occurs during
deserialization.
- In the future, `@differentiating` attribute will be lowered to SIL
differentiability witness tables, which will be serialized.
Unblocks swiftlang#23193: using `@differentiating` attribute in the stdlib.
rxwei
added a commit
to rxwei/swift
that referenced
this pull request
May 11, 2019
…swiftlang#23193) * [AutoDiff] [stdlib] Switch to '@differentiating' as much as possible. `@differentiable(vjp: ...)` will be deprecated as soon as we support parameter selection and generic constraints with retroactive derivative registration (`@differentiating(...)`). * Add `@differentiating` attributes to floating-point operations. * Update derivative names for stdlib operators in tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@differentiable(vjp: ...)will be deprecated as soon as we support parameter selection and generic constraints with retroactive derivative registration (@differentiating(...)).