swift
5779f1ca - [AutoDiff] Retroactive differentiability: implement `@differentiating` attribute. (#22225)

Commit
6 years ago
[AutoDiff] Retroactive differentiability: implement `@differentiating` attribute. (#22225) The `@differentiating` attribute retroactively registers functions as derivatives of other functions. It is declared on derivative functions (JVPs and VJPs) and specifies the original function name. This patch adds parsing/type-checking/serialization for `@differentiating` attribute. Next steps are to add SIL support (SILGen and differentiation transform). Reused/refactored existing code as appropriate. Also took the opportunity to rearrange attribute definitions so `@differentiable` immediately precedes `@differentiating`. This warrants a module format version bump.
Author
Parents
Loading