Skip to content

[AutoDiff] Use @_fieldwiseDifferentiable on struct decls and deprecate @_fieldwiseProductSpace. #22009

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 1 commit into from
Jan 20, 2019

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Jan 20, 2019

  • Derived conformances for Differentiable put @_fieldwiseProductSpace on either all associated types or none, so it is redundant to keep this attribute on every typealias in a Differentiable type. Instead, we move it up to the parent struct decl so that it simplifies both derivation and checking.

  • Simplify struct_extract differentiation logic and improve code style.

  • Remove legacy lookUpOrLinkFunction and have everything go through DifferentiationTask.

…ate `@_fieldwiseProductSpace`.

* Derived conformances for `Differentiable` puts `@_fieldwiseProductSpace` on either all associated types or none, so it is redundant to keep this attribute on every typealias in a `Differentiable` type. Instead, we move it up to the parent struct decl so that it simplifies both derivation and checking.

* Simplify `struct_extract` differentiation logic and improve code style.

* Remove legacy `lookUpOrLinkFunction` and have everything go through `DifferentiationTask`.
@rxwei rxwei requested a review from dan-zheng January 20, 2019 11:01
@rxwei rxwei added the tensorflow This is for "tensorflow" branch PRs. label Jan 20, 2019
@rxwei
Copy link
Contributor Author

rxwei commented Jan 20, 2019

@swift-ci please test tensorflow

Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great simplification of the semantics of @_fieldwiseDifferentiable 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tensorflow This is for "tensorflow" branch PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants