Skip to content

Experimental toolchain to compile and run Chainer models

License

Notifications You must be signed in to change notification settings

akmaru/chainer-compiler

 
 

Repository files navigation

Chainer compiler: experimental toolchain to compile and run Chainer models

Build Status

This is an experimental toolchain expected to be used with Chainer. This project aims to achieve a bunch of correlated goals such as

  • Make Python Chainer model deployable without Python runtime
  • Efficiently execute Chainer models with optimization techniques
  • Integrate Chainer with other systems or domain-specific chips
  • Be a playground to try algorithms for neural network frameworks

without sacrificing flexibility and coverage of Chainer.

To achieve these goals, this toolchain

  • Translates Python AST to extended ONNX. As this is a compiler rather than an execution tracer, it can export Python code with control-flows (e.g., LSTM with attention written by Python's loop)
  • Modifies the graph for optimization, auto-differentiation, etc. It then generates deployable code.
  • Runs the exported code with ChainerX's C++ API. Currently, the only backend it supports is a simple virtual machine implemented by ChainerX.

This project is still in the early stage and is not expected to be used by end-users. Interfaces can change quickly and some features may be abandoned. That said, it will be appreciated if you try this a bit and give us any feedbacks. Also, importantly, we are hiring! If you are interested in working on deep learning frameworks, please consider applying to Preferred Networks.

Documentation

About

Experimental toolchain to compile and run Chainer models

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 52.0%
  • C++ 45.5%
  • CMake 2.2%
  • Other 0.3%