Skip to content

Commit 28d4614

Browse files
authored
Merge pull request #28211 from dan-zheng/differentiable-attr-syntax
[AutoDiff upstream] Update `@differentiable` syntax.
2 parents 592880d + cd17339 commit 28d4614

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

utils/gyb_syntax_support/AttributeNodes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
# generic-where-clause?
210210
Node('DifferentiableAttributeArguments', kind='Syntax',
211211
description='''
212-
The arguments for the `@differentiable` attribute: an optional \
212+
The arguments for the `@differentiable` attribute: an optional
213213
differentiation parameter list and associated functions.
214214
''',
215215
children=[
@@ -219,10 +219,6 @@
219219
The comma following the differentiation parameters clause,
220220
if it exists.
221221
''', is_optional=True),
222-
Child('MaybePrimal', kind='DifferentiableAttributeFuncSpecifier',
223-
is_optional=True),
224-
Child('MaybeAdjoint', kind='DifferentiableAttributeFuncSpecifier',
225-
is_optional=True),
226222
Child('MaybeJVP', kind='DifferentiableAttributeFuncSpecifier',
227223
is_optional=True),
228224
Child('MaybeVJP', kind='DifferentiableAttributeFuncSpecifier',
@@ -266,7 +262,7 @@
266262
# differentiation-param -> ('self' | identifer) ','?
267263
Node('DifferentiationParam', kind='Syntax',
268264
description='''
269-
A differentiation parameter: either the "self" identifier or a \
265+
A differentiation parameter: either the "self" identifier or a
270266
function parameter name.
271267
''',
272268
traits=['WithTrailingComma'],
@@ -283,7 +279,7 @@
283279
# ('jvp' | 'vjp') ':' func-decl-name ','?
284280
Node('DifferentiableAttributeFuncSpecifier', kind='Syntax',
285281
description='''
286-
A function specifier, consisting of an identifier, colon, and a \
282+
A function specifier, consisting of an identifier, colon, and a
287283
function declaration name (e.g. `vjp: foo(_:_:)`).
288284
''',
289285
traits=['WithTrailingComma'],
@@ -313,7 +309,7 @@
313309
]),
314310
Child('Arguments', kind='DeclNameArguments',
315311
is_optional=True, description='''
316-
The argument labels of the referenced function, optionally \
312+
The argument labels of the referenced function, optionally
317313
specified.
318314
'''),
319315
]),

0 commit comments

Comments
 (0)