Skip to content

Commit 7b7cc53

Browse files
Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <[email protected]>
1 parent 7525ea4 commit 7b7cc53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/DifferentiableProgrammingImplementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ This involves:
970970
This approach is implemented in https://github.com/apple/swift/pull/28570. A partially-applied reabstraction thunk derivative matches the derivative type of the reabstracted original function.
971971

972972
Alternatives:
973-
- Make reabstraction thunk JVPs/VJPs take a JVP/VJP function-typed argument instead of a `@differentiable` function-typed argument.
973+
- Make reabstraction thunk JVPs/VJPs take a "JVP/VJP" function-typed argument instead of a `@differentiable` function-typed argument.
974974
- This seems more efficient because reabstraction thunk JVPs/VJPs only need to call the original function’s JVP/VJP - the other elements of the `@differentiable` function are not relevant.
975975
- It may be possible that the derivative of a reabstraction thunk is simply a reabstraction thunk for the derivative function’s type. If so, this would be a significant simplification: within the reabstraction thunk derivative, we can simply call another reabstraction thunk and avoid other code generation (e.g. reabstraction thunk differential/pullback functions).
976976
- `JVPEmitter::visitApplyInst` and `VJPEmitter::visitApplyInst` need special case logic to transform the single `apply` in reabstraction thunks into an `apply` of the “JVP/VJP” function-typed argument.

0 commit comments

Comments
 (0)