swift
4ebb9104 - [AutoDiff] Add `differentiability_witness_function` instruction. (#27719)

Commit
6 years ago
[AutoDiff] Add `differentiability_witness_function` instruction. (#27719) `differentiability_witness_function` looks up a differentiability witness function (JVP, VJP, or transpose) for a referenced function using SIL differentiability witnesses. ``` %vjp = differentiability_witness_function [vjp] [parameters 0 1] [results 0] \ <T where T: Differentiable, T == T.TangentVector> \ @generic : $@convention(thin) <T> (@in_guaranteed T, Float) -> @out T ``` The differentiability witness function kind identifies the witness function to look up: ``[jvp]``, ``[vjp]``, or ``[transpose]``. The remaining components identify the SIL differentiability witness: - Original function name. - Parameter indices. - Result indices. - Witness generic signature (optional). When parsing SIL, the parsed witness generic signature is combined with the original function's generic signature to form the full witness generic signature. Resolves TF-915.
Author
Parents
Loading