[AutoDiff upstream] Add differentiability_witness_function instruction. (#29765)

The `differentiability_witness_function` instruction looks up a
differentiability witness function (JVP, VJP, or transpose) for a referenced
function via SIL differentiability witnesses.

Add round-trip parsing/serialization and IRGen tests.

Notes:
- Differentiability witnesses for linear functions require more support.
  `differentiability_witness_function [transpose]` instructions do not yet
  have IRGen.
- Nothing currently generates `differentiability_witness_function` instructions.
  The differentiation transform does, but it hasn't been upstreamed yet.

Resolves TF-1141.
This commit is contained in:
Dan Zheng
2020-02-13 16:55:46 -08:00
committed by GitHub
parent 94983ce43c
commit a49428ca7c
22 changed files with 557 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 539; // swift master-rebranch
const uint16_t SWIFTMODULE_VERSION_MINOR = 540; // differentiability_witness_function instruction
/// A standard hash seed used for all string hashes in a serialized module.
///