Giter Club home page Giter Club logo

graph-ir's Introduction

Graph Intermediate Representation

The Graph Intermediate Representation (GIR) is an abstract representation of mathematical computations.

The main motivation comes from the LLVM project which revolutionized compiler engineering by providing a unified intermediate representation (LLVM-IR). This allowed the rapid development of optimizations on this intermediary representation independent of the front and back end. With increasing rise in AI and Machine Learning there have been many tools, such as Caffe, Theano, Tensorflow, Torch7, CNTK, MXNet and many others, whose main goals is to optimize the computation of programs which involve only numerical calculations on large multi-dimensional arrays. In addition to this they provide automatic differentiation capabilities in order to simplify and speed up prototype development and research. Unfortunately, each of these projects uses their own internal representation for the computation undertaken, and the maintainers of each package reinvent the wheel by both building a similar data structure as well as independently developing different forms of optimizations. It is the authors belief that this slows down the development of the field and also does not help the community to jointly benefit from all of the work done in the area.

The main goals of the project are:

  1. Provide a unified and general Graph Intermediate Representation, which to capture all possible mathematical computations.

  2. Provide automatic meta-data inference for all operations, which to allow the correct choice of down-stream implementations. The meta-data covers things like: shape, data type, symmetry for matrices, positive definite qualifiers for matrices, specially structured matrix variants like diagonal, tri-diagonal and etc...

  3. Provide automatic differentiation as a graph operation for both forward and backward mode.

  4. Provide bindings to different languages in order to allow developers of Machine Learning and computational tools in general to easily leverage the GIR.

This in terms will faciliate the development of unified optimization procedures on the GIR which to benefit all software packages using it. These will include optimizations for both single device and distributed computation.

Development of the project

The project is still in its very infancy, however a large part of the project has already been implemented. The main Graph and Operator representation together with the meta-data has been defined and implemented. Forward and backward automatic differentiation has been already implemented for most of the operators. The main missing bit at this stage is a simple native backend which to faciliate unit testing on very small problems.

List of operators that have not yet been implemented

  1. Convolution

  2. MaxPooling

  3. Indexing

  4. GradientIndexing

  5. SubRoutineOperator - the subroutine will allow complex computation to be hidden from the overall graph and to be optimized on its own. This will provide a form of encapsulation when the user needs it.

The Native Backend

Unit testing and verification of the GIR is crucial for the project. In order to faciliate this without developing a significantly sophisticated general backend, a simple native mock C++ backend is needed. This most likely will be a highly inefficient and slow for large tasks, however it will be sufficient for verification of automatic differentiation rules.

Contribution

If anyone is interested in contributing to the project please contact the authors at ...

graph-ir's People

Contributors

botev 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.