GithubHelp home page GithubHelp logo

dmillard / autogen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eric-heiden/autogen

0.0 1.0 0.0 976 KB

Autogenic differentiation

Home Page: https://eric-heiden.github.io/autogen/

License: MIT License

CMake 0.92% C++ 93.94% Python 5.14%

autogen's Introduction

autogen

autogen-docs

Code generation for automatic differentiation with GPU support.

This library leverages CppAD and CppADCodeGen to trace C++ and Python code, and turns it into efficient CUDA or C code. At the same time, the Jacobian and Hessian code can be automatically generated through reverse-mode or forward-mode automatic differentiation. The generated code is compiled to a dynamic library which typically runs orders of magnitude faster than the original user code that was traced, while multiple calls to the forward or backward versions of the function can be parallelized through CUDA or OpenMP.

Requirements

The library requires CMake and a C++ compiler with stable support for C++17, for example

First, check out the git submodules via

git submodule update --init --recursive

Python

Note: Only Python 3.4 and newer is supported.

Install pybind11:

pip install pybind11

For development, install autogen via the following command:

pip install -e .

To specify explicitly a compatible C++17 compiler, you can do so via preprocessor definitions:

CC=gcc-9 CXX=g++-9 pip install -e .

Features

The following features are available on the different operating systems:

AutoDiff Mode UNIX Windows
CppAD tracing
CPU code generation ✅ (GCC, Clang) ✅ (MSVC, Clang)
CUDA code generation ✅ (NVCC) ✅ (NVCC)

Windows CPU Support

CPU-bound code compilation on Windows is available through Microsoft Visual C++ (MSVC) and the Clang compiler at the moment. Depending on the selected compiler/linker, make sure cl.exe and link.exe, or clang.exe are available on the system path. It might be necessary to first load the build variables in the console session by running

"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

autogen's People

Contributors

eric-heiden avatar airuichen avatar vedantmistry13 avatar dmillard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.