Skip to content

mrsekut/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 54.1%
  • C++ 42.6%
  • CMake 2.3%
  • Dockerfile 0.6%
  • Shell 0.3%
  • Ruby 0.1%