Skip to content

[AutoDiff] Clean up differentiation-related attributes. #28466

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 4 commits into from
Nov 25, 2019

Conversation

dan-zheng
Copy link
Contributor

@dan-zheng dan-zheng commented Nov 24, 2019

  • Unify syntax for @differentiating and @transposing attributes:
    DerivativeRegistrationAttributeArguments.
  • Remove obsolete linear flag from @differentiating attribute.
    The @transposing attribute is now used for transpose registration.
  • Unify parsing diagnostics.
  • Unify duplicated parsing errorAndSkipToEnd logic.
    • Create a shared errorAndSkipUntilConsumeRightParen helper and use it when
      parsing @differentiating and @transposing attribute to improve (reduce)
      diagnostics.
  • Minor formatting changes.

Todos:

  • Upstream changes to previously upstreamed code, e.g. Parser::parseDifferentiationParametersClause.
  • TF-991: deprecate @differentiating and rename to @derivative(of:).
  • TF-992: deprecate @transposing and rename to @transpose(of:).

- Unify syntax for `@differentiating` and `@transposing` attributes:
  `DerivativeRegistrationAttributeArguments`.
- Remove obsolete `linear` flag from `@differentiating` attribute.
  The `@transposing` attribute is now used for transpose registration.
- Unify parsing diagnostics.
- Unify duplicated parsing `errorAndSkipToEnd` logic.
  - Create a shared `errorAndSkipUntilConsumeRightParen` helper and use it when
    parsing `@differentiating` and `@transposing` attribute to improve (reduce)
    diagnostics.
- Minor formatting changes.
@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Nov 24, 2019
@dan-zheng
Copy link
Contributor Author

Verifying that tests pass.
@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng dan-zheng merged commit e90816b into swiftlang:tensorflow Nov 25, 2019
@dan-zheng dan-zheng deleted the ∂p-attr-cleanup branch November 25, 2019 01:17
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