Skip to content

Commit ab4cdc1

Browse files
committed
[Docs] [AutoDiff] Improve wording in various places in the manifesto.
1 parent 57d5c4d commit ab4cdc1

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/DifferentiableProgramming.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,15 @@ extension Perceptron {
893893

894894
### `@differentiable` function types
895895

896-
A subtype of normal function types with a different runtime representation,
897-
which stores metadata that allows their values to be differentiated anywhere.
896+
Differentiable functions are first-class values, identified by a
897+
`@differentiable` attribute in the function type. A `@differentiable` function
898+
type is a subtype of its corresponding normal function type (i.e. without a
899+
`@differentiable` attribute) with an extended ABI, which stores metadata that
900+
allows their values to be differentiated anywhere the function is passed. A
901+
`@differentiable(linear)` function type is a subtype of its corresponding
902+
`@differentiable` function type. A normal function can be implicitly converted
903+
to a `@differentiable` or `@differentiable(linear)` function with appropriate
904+
compile-time checks.
898905

899906
```swift
900907
func addOne(_ x: Float) -> Float { x + 1 }
@@ -920,8 +927,9 @@ func _(_ x: Float) -> (value: Float,
920927

921928
### Differential operators
922929

923-
Standard library differentiation APIs that take `@differentiable` functions and
924-
return derivative functions or compute derivative values.
930+
Differential operators are APIs defined in the standard library that take
931+
`@differentiable` functions and return derivative functions or compute
932+
derivative values.
925933

926934
```swift
927935
// In the standard library:
@@ -2318,7 +2326,7 @@ As shown in the
23182326
subsection, a `@differentiable` function value's runtime representation contains
23192327
the original function along with extra information that allows the function to
23202328
be differentiated (or transposed, if it is `@differentiable(linear)`). A
2321-
@differentiable or `@differentiable(linear)` function value can be called like a
2329+
`@differentiable` or `@differentiable(linear)` function value can be called like a
23222330
non-`@differentiable` function. A `@differentiable(linear)` function value can
23232331
be implicitly converted to a `@differentiable` one, which can be implicitly
23242332
converted to a non-`@differentiable` one.

0 commit comments

Comments
 (0)