You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AutoDiff] Directly SILGen @derivative attributes to diff witnesses. (#28621)
Previously, `@derivative` attribute type-checking created implicit
`@differentiable` attributes on the original declaration. This was a
longstanding hack powering `@derivative` attribute derivative registration.
#28608 made these changes:
- Derivative function configurations (from `@differentiable` and `@derivative`
attributes) are serialized in modules and are loaded from imported modules.
- The differentiation transform uses these derivative function configurations
for derivative function lookup instead of `@differentiable` attributes.
Now, `@derivative` attributes are directly lowered to differentiability
witnesses during SILGen, and implicit `@differentiable` attribute generation
is removed. `@derivative` attributes are now serialized.
Resolves TF-835.
Unblocks TF-1021: lifting the "same-file derivative registration only"
limitation in `@derivative` attribute type-checking. This should be trivially
possible but requires more testing.
Exposes TF-1037: crash due to `@differentiable` + `@derivative` attribute with
different derivative generic signatures.
Exposes TF-1040: `@differentiable` attribute limitations for class methods.
Exposes TF-1041: untested protocol requirement `@differentiable` attribute
type-checking logic.
Tracks TF-1042: remove `ASTContext::{Differentiable,Derivative}Attrs` and use
`AbstractFunctionDecl::getDerivativeFunctionConfigurations` to detect duplicate
`@differentiable` + `@derivative` attributes.
0 commit comments