Skip to content

[Sema] [AutoDiff] Modify/fix Differentiable derived conformances. #21871

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 2 commits into from
Jan 15, 2019

Conversation

dan-zheng
Copy link
Contributor

  • Fix crasher regarding bad interaction between AdditiveArithmetic and
    Differentiable derived conformances, where both code paths attempt to
    synthesize memberwise initializers.

  • Conform synthesized AllDifferentiableVariables struct to KeyPathIterable
    if parent conforms to KeyPathIterable.

    • This is important for key-path based optimizer definitions.
  • Modify associated struct synthesis to check whether any @noDerivative
    stored properties exist.

    • If any @noDerivative stored properties exist, AllDifferentiableVariables
      struct must be synthesized.
  • Refactor derived conformances code, add tests.

- Fix crasher regarding bad interaction between AdditiveArithmetic and
  Differentiable derived conformances, where both code paths attempt to
  synthesize memberwise initializers.

- Conform synthesized `AllDifferentiableVariables` struct to `KeyPathIterable`
  if parent conforms to `KeyPathIterable`.
  - This is important for key-path based optimizer definitions.

- Modify associated struct synthesis to check whether any `@noDerivative`
  stored properties exist.
  - If any `@noDerivative` stored properties exist, `AllDifferentiableVariables`
    struct must be synthesized.

- Refactor derived conformances code, add tests.
@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Jan 15, 2019
@dan-zheng dan-zheng requested a review from rxwei January 15, 2019 06:05
@rxwei
Copy link
Contributor

rxwei commented Jan 15, 2019

@swift-ci please test tensorflow

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow macOS

@rxwei
Copy link
Contributor

rxwei commented Jan 15, 2019

@swift-ci Please clean test tensorflow macOS

1 similar comment
@dan-zheng
Copy link
Contributor Author

@swift-ci Please clean test tensorflow macOS

@rxwei rxwei merged commit fb1be04 into swiftlang:tensorflow Jan 15, 2019
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