[AutoDiff upstream] Minor cleanup for @differentiable attribute.

Add TODO comments referencing JIRA issues.

Add disabled `@differentiable` attribute serialization test.
TF-836 tracks enabling the test.
Blocked by TF-828: `@differentiable` attribute type-checking.
This commit is contained in:
Dan Zheng
2019-11-16 15:07:57 -08:00
parent 23edd22824
commit 2d2a5ded9d
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()))