Skip to content

An Object Oriented Design and Implementation for Automatic Differentiation

fqiang edited this page Dec 6, 2014 · 8 revisions

Pre-requisite

  1. build and tested with icpc, gcc on Linux and MacOS
  2. requires boost library for sparse matrix types
  3. the demonstrative auto test project using boost

How to use

  1. build the autodiff_library.a static library
    cd ./autodiff_library/Release/.
    make clean;make
  2. build the test project
    cd ./autodiff_test/Release/.
    make clean;make
  3. run the test routines in the test project.
    ./autodiff_library_test

Design highlights

  1. Expression tree is building into a DAG and allows repeated expression.
  2. Adapts OO-Design principle and implemented in C++
  3. Separate Tapes for holding indices and values.
  4. Compiled to a Static-library that can be linked with other application.

Features

  1. Computing sparsity pattern in gradient and Hessian matrix.
  2. Reverse gradient computation.
  3. Reverse Hessian-vector computation.
  4. Full reverse Hessian computation (Implemented Edge_pushing algorithm by Rober Gower).

TODO

  1. Move the tree expression structure onto tape.
  2. Implement OO-Design concept for supporting new function operators.
  • so an additional implemented operator can be added as a new class object.
  1. Graph coloring algorithm for sparse Hessian.