-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff] Enable differentiation wrt "subset indices". #23887
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
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
Remove this error: `function is differentiable only with respect to a smaller subset of arguments`. The differentiation pass (and "minimal indices" logic) actually supports such differentiation wrt "subset indices". All that is needed is to remove the deprecated error.
@swift-ci Please test tensorflow |
rxwei
approved these changes
Apr 9, 2019
Note that this may have unexpected memory issues. Should be looked at later. |
@swift-ci Please test tensorflow macOS |
rxwei
added a commit
that referenced
this pull request
Apr 11, 2019
…on types. (#23854) This is to unblock `@differentiable` functions with `@nondiff` parameters. - Propagate `@nondiff` from AST to SIL. - Add `AnyFunctionType::getWithoutDifferentiability`, which drops all `@differentiable` and `@nondiff` attributes from a function type. - Use autodiff parameter indices from function types now that `@nondiff` has been propagated. - Replace currying logic from `SILFunctionType::getAssociatedFunctionType` with lightweight logic that handles methods, which is needed for differentiable protocol requirements. - Emit an error when a `@nondiff` parameter is being differentiated with respect to. - Fix `@nondiff` AST printing. Note: - Once `SILDifferentiableFunctionType` in #23482 lands, `@nondiff` should be nuked from SIL. - Before merging, pull from the `tensorflow` branch to make sure #23887 is merged. Resolves [TF-421](https://bugs.swift.org/browse/TF-421).
rxwei
added a commit
to rxwei/swift
that referenced
this pull request
May 11, 2019
…on types. (swiftlang#23854) This is to unblock `@differentiable` functions with `@nondiff` parameters. - Propagate `@nondiff` from AST to SIL. - Add `AnyFunctionType::getWithoutDifferentiability`, which drops all `@differentiable` and `@nondiff` attributes from a function type. - Use autodiff parameter indices from function types now that `@nondiff` has been propagated. - Replace currying logic from `SILFunctionType::getAssociatedFunctionType` with lightweight logic that handles methods, which is needed for differentiable protocol requirements. - Emit an error when a `@nondiff` parameter is being differentiated with respect to. - Fix `@nondiff` AST printing. Note: - Once `SILDifferentiableFunctionType` in swiftlang#23482 lands, `@nondiff` should be nuked from SIL. - Before merging, pull from the `tensorflow` branch to make sure swiftlang#23887 is merged. Resolves [TF-421](https://bugs.swift.org/browse/TF-421).
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.
Remove this error:
function is differentiable only with respect to a smaller subset of arguments
.The differentiation pass (and "minimal indices" logic) actually supports
such differentiation wrt "subset indices". All that is needed is to remove
the deprecated error.