swift
07596cbc - [AutoDiff upstream] Relax `@differentiable` for protocol witnesses. (#30629)

Commit
5 years ago
[AutoDiff upstream] Relax `@differentiable` for protocol witnesses. (#30629) Previously, all witnesses of a `@differentiable` protocol requirement were required to have the same attribute (or one with superset parameter indices). However, this leads to many annotations on witnesses and is not ideal for usability. `@differentiable` attributes are really only significant on public witnesses, so that they are clearly `@differentiable` at a glance (in source code, interface files, and API documentation), without looking through protocol conformance hierarchies. Now, only *public* witnesses of `@differentiable` protocol requirements are required to have the same attribute (or one with superset parameter indices). For less-visible witnesses, an implicit `@differentiable` attribute is created with the same configuration as the requirement's. Resolves TF-1117. Upstreams #29771 from tensorflow branch.
Author
Parents
Loading