Skip to content

Commit 439808d

Browse files
authored
[AutoDiff] Update @differentiable syntax. (#28212)
Clean up unused syntax components and fix description strings. Upstream PR: #28211
1 parent 317ef49 commit 439808d

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
@@ -210,7 +210,7 @@
210210
# specifiers appear only once, in order.
211211
Node('DifferentiableAttributeArguments', kind='Syntax',
212212
description='''
213-
The arguments for the `@differentiable` attribute: an optional \
213+
The arguments for the `@differentiable` attribute: an optional
214214
differentiation parameter list and associated functions.
215215
''',
216216
children=[
@@ -220,10 +220,6 @@
220220
The comma following the differentiation parameters clause,
221221
if it exists.
222222
''', is_optional=True),
223-
Child('MaybePrimal', kind='DifferentiableAttributeFuncSpecifier',
224-
is_optional=True),
225-
Child('MaybeAdjoint', kind='DifferentiableAttributeFuncSpecifier',
226-
is_optional=True),
227223
Child('MaybeJVP', kind='DifferentiableAttributeFuncSpecifier',
228224
is_optional=True),
229225
Child('MaybeVJP', kind='DifferentiableAttributeFuncSpecifier',
@@ -267,7 +263,7 @@
267263
# differentiation-param -> ('self' | identifer) ','?
268264
Node('DifferentiationParam', kind='Syntax',
269265
description='''
270-
A differentiation parameter: either the "self" identifier or a \
266+
A differentiation parameter: either the "self" identifier or a
271267
function parameter name.
272268
''',
273269
traits=['WithTrailingComma'],
@@ -284,7 +280,7 @@
284280
# ('jvp' | 'vjp') ':' func-decl-name ','?
285281
Node('DifferentiableAttributeFuncSpecifier', kind='Syntax',
286282
description='''
287-
A function specifier, consisting of an identifier, colon, and a \
283+
A function specifier, consisting of an identifier, colon, and a
288284
function declaration name (e.g. `vjp: foo(_:_:)`).
289285
''',
290286
traits=['WithTrailingComma'],
@@ -314,7 +310,7 @@
314310
]),
315311
Child('Arguments', kind='DeclNameArguments',
316312
is_optional=True, description='''
317-
The argument labels of the referenced function, optionally \
313+
The argument labels of the referenced function, optionally
318314
specified.
319315
'''),
320316
]),

0 commit comments

Comments
 (0)