Welcome to PSyclone autodiff
module fork, a prototype implementation of forward- and reverse-mode automatic differentation in PSyclone.
Please see psyclone-autodiff on ReadTheDocs for more information.
For PSyclone itself, see GitHub and ReadTheDocs.
This implements forward- and reverse-mode automatic differentiation using source-to-source transformations.
Compared to other tools, it uses a static or dynamic array as a tape to record and restore values rather than a LIFO stack.
What has been implemented (but not necessarily tested):
- transforming subroutines containing:
- assignments,
- calls to subroutines,
- (some) unary and binary operations,
- scalar and array variables and arguments,
- nested calls to subroutines,
- simplification of the transformed subroutines as a postprocessing step,
- in reverse-mode:
- three different types of reversal schedules,
- recording and restoring values from a tape.
- conditional branches, including taping the condition and restoring it in reverse-mode.
- loops, with explicit tape indexing in reverse-mode.
What has not been implemented:
- functions and programs,
- nary operations,
- activity analysis (dependence DAG),
- to-be-recorded (TBR) analysis,
- and much more.
A talk slide deck can be found in the src/psyclone/autodiff/documents
subdirectory.
Instructions for installing from source can be found on ReadTheDocs in the getting started section.
The documentation is not yet hosted online.
It can be generated using the instructions found in the doc/reference_guide/
subdirectory.
The Doxygen documentation built in doc/reference_guide/build/html/_static/html/index.html
is suggested over the Sphinx one.
A tutorial may be found in the src/psyclone/autodiff/tutorial
subdirectory.
Tests include unit tests for some of the transformations and numerical comparisons to Tapenade 3.16.