[AutoDiff] Serialize and print @derivative and @transpose accessor kind. (#32839)

Serialize and print the optional accessor kind in `@derivative` and `@transpose`
attributes.

Resolves TF-1293.
This commit is contained in:
Dan Zheng
2020-07-12 15:04:49 -07:00
committed by GitHub
parent bfcf12bac6
commit bf47403162
8 changed files with 99 additions and 18 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 = 563; // unchecked_value_cast
const uint16_t SWIFTMODULE_VERSION_MINOR = 564; // `@derivative` attribute accessor kind
/// A standard hash seed used for all string hashes in a serialized module.
///
@@ -1848,6 +1848,8 @@ namespace decls_block {
Derivative_DECL_ATTR,
BCFixed<1>, // Implicit flag.
IdentifierIDField, // Original name.
BCFixed<1>, // Has original accessor kind?
AccessorKindField, // Original accessor kind.
DeclIDField, // Original function declaration.
AutoDiffDerivativeFunctionKindField, // Derivative function kind.
BCArray<BCFixed<1>> // Differentiation parameter indices' bitvector.