Skip to content

Conversation

@rxwei
Copy link
Contributor

@rxwei rxwei commented Mar 9, 2019

@differentiable(vjp: ...) will be deprecated as soon as we support parameter selection and generic constraints with retroactive derivative registration (@differentiating(...)).

@rxwei rxwei added the tensorflow This is for "tensorflow" branch PRs. label Mar 9, 2019
@rxwei rxwei requested review from dan-zheng and pschuh March 9, 2019 00:57
@rxwei
Copy link
Contributor Author

rxwei commented Mar 9, 2019

@swift-ci please test tensorflow

`@differentiable(vjp: ...)` will be deprecated as soon as we support parameter selection and generic constraints with retroactive derivative registration (`@differentiating(...)`).
@rxwei rxwei force-pushed the retrodiff-switch branch from f4586bb to 4ff9a3b Compare March 9, 2019 01:00
@rxwei
Copy link
Contributor Author

rxwei commented Mar 9, 2019

@swift-ci please test tensorflow

@rxwei
Copy link
Contributor Author

rxwei commented Mar 9, 2019

Aha, right, this thing didn't have libSyntax support yet.

@dan-zheng
Copy link
Contributor

Retriggering tests.
Syntax support for @differentiating added in #23340.
Differentiation parameter inference fixed in #23350.

@dan-zheng
Copy link
Contributor

@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor

Working on the final fix for things to compile!
(serialization of AutoDiffParameterIndices for @differentiating attribute)

@dan-zheng
Copy link
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.
@dan-zheng
Copy link
Contributor

@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor

@swift-ci Please test tensorflow linux

@rxwei
Copy link
Contributor Author

rxwei commented Mar 20, 2019

Exciting!

@rxwei rxwei merged commit 2b72e1b into swiftlang:tensorflow Mar 20, 2019
@rxwei rxwei deleted the retrodiff-switch branch March 20, 2019 19:14
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

Labels

tensorflow This is for "tensorflow" branch PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants