Commit Graph

7 Commits

Author SHA1 Message Date
Slava Pestov
b57be6dbf1 Revert "AutoDiff: Disable requirement machine when building or testing Differentiation library"
This reverts commit 4f6ba29715.
2021-09-23 13:24:40 -04:00
Slava Pestov
4f6ba29715 AutoDiff: Disable requirement machine when building or testing Differentiation library
The SIL type lowering logic for AutoDiff gets the substituted generic signature
mixed up with the invocation generic signature, so it tries to ask questions
about DependentMemberTypes in a signature with no requirements. This triggers
assertions when the requirement machine is enabled.

Disable the requirement machine until this is fixed.
2021-07-30 19:42:31 -04:00
Richard Wei
0b53a02544 [AutoDiff] Rename 'in:' to 'of:' in differential operators.
Rename the argument label `in:` in `gradient(at:in:)`, `pullback(at:in:)`, etc to `of:`, as suggested in the [pitch thread](https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147).
2021-02-24 01:33:42 -05:00
Richard Wei
cdf9b037ac [AutoDiff] Remove 'valueWithDerivative(of:)' and 'valueWithGradient(of:)'.
`valueWithDerivative(of:)` and `valueWithGradient(of:)` are the curried version of `valueWithDerivative(at:in:)` and `valueWithGradient(at:in:)`, respectively. They are not included the proposal and are not being used by any client that I know of. This patch removes them.
2021-01-16 17:30:58 -08:00
Richard Wei
f79391b684 [AutoDiff] Remove 'differentiableFunction(from:)' and 'linearFunction(from:)'.
Remove unused APIs `differentiableFunction(from:)` and `linearFunction(from:)`. They were never official APIs, are not included in the [initial proposal](https://github.com/rxwei/swift-evolution/blob/autodiff/proposals/0000-differentiable-programming.md#make-a-function-differentiable-using-derivative), and are unused by existing supported client libraries (SwiftFusion and S4TF). Most importantly, they block crucial optimizations on linear map closures (#34935) and would need nontrivial work in SILGen to support.
2021-01-12 11:58:48 -08:00
Mishal Shah
a3cd8bc9e9 [Tests] Codesign the binary before executing the test 2020-08-07 00:26:07 -07:00
Michelle Casbon
1c5eaed84d Add .gyb extension to filename 2020-04-10 21:22:01 +00:00