Merge pull request #28307 from dan-zheng/autodiff-cleanup

This commit is contained in:
swift-ci
2019-11-16 18:30:27 -08:00
committed by GitHub
4 changed files with 143 additions and 1 deletions

View File

@@ -2291,6 +2291,11 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
vjpRef = S.addDeclRef(vjpFunction);
auto paramIndices = attr->getParameterIndices();
// TODO(TF-837): Implement `@differentiable` attribute serialization.
// Blocked by TF-828: `@differentiable` attribute type-checking, which
// resolves parameter indices (`IndexSubset *`).
if (!paramIndices)
return;
assert(paramIndices && "Checked parameter indices must be resolved");
SmallVector<bool, 4> indices;
for (unsigned i : range(paramIndices->getCapacity()))