swift
85c828e7 - [AutoDiff] Differentiate partially-applied reabstraction thunks.

Commit
5 years ago
[AutoDiff] Differentiate partially-applied reabstraction thunks. Support differentiation of partially-applied reabstraction thunks: ``` %generic_fn = function_ref @generic : $<τ_0_0> (@in_guaranteed τ_0_0) -> @out τ_0_0 %specialized_fn = partial_apply %generic_fn<Float>() %reabs_thunk = function_ref @reabs_thunk : $(Float, @guaranteed @callee_guaranteed (@in_guaranteed Float) -> @out Float) -> Float %thunked_fn = partial_apply %reabs_thunk(%specialized_fn) %diff_fn = differentiable_function %thunked_fn ``` The enables differentiation of direct references to generic functions. - SIL: add special reabstraction thunk case to `SILFunctionType::getAutoDiffDerivativeFunctionType`. - Reabstraction thunks have a function as the last argument. - Reabstraction thunk JVPs/VJPs have a `@differentiable` function as the last argument. - Differentiation transform: handle partially-applied reabstraction thunks in `reapplyFunctionConversion`. Resolves TF-201.
Author
Committer
Parents
Loading