Commit Graph

53 Commits

Author SHA1 Message Date
Dan Zheng
8f8639b071 [AutoDiff] NFC: Reimplement JVPCloner using pimpl pattern.
`JVPCloner.h` is now tiny: `JVPCloner` exposes only a `bool run()` entry point.

All of the implementation is moved to `JVPCloner::Implementation` in
`JVPCloner.cpp`. Methods can be defined directly in `JVPCloner.cpp` without
separate declarations.
2020-07-10 14:19:22 -07:00
Dan Zheng
cd3f46f99d [AutoDiff] NFC: Garden assertions.
Clarify `llvm_unreachable` after exhaustive switch is needed to silence
MSVC C4715, so we don't accidentally remove it.

Standardize some assertion messages.
2020-07-09 08:06:38 -07:00
Dan Zheng
ec5da7427b [AutoDiff] NFC: garden differentiation transform. (#32770)
Rename "emitters" to "cloners", for consistency:
- `JVPEmitter` -> `JVPCloner`
- `VJPEmitter` -> `VJPCloner`
- `PullbackEmitter` -> `PullbackCloner`

Improve `PullbackCloner` documentation.
- Document previously undocumented methods.
- Update outdated documentation.
  - For adjoint value accumulation helpers: rename "buffer access" occurrences to
    "address". Pullback generation no logner uses buffer accesses (`begin_apply`).
2020-07-08 19:26:36 -07:00