Hacker News new | ask | show | jobs
by jklontz 3581 days ago
Going to take this opportunity to plug my related project [Likely](www.liblikely.org), a DSL for lowering machine learning inference algorithms.

One of the projects we've built on top of it is a static compiler for Caffe model files. This allows you to execute Caffe models _without_ a runtime dependency on Caffe libraries. Thus you can target OSes and CPUs not supported by mainline Caffe. If you have commercial interest in this capability please reach out to me.

2 comments

Very interesting, I recently put together a simple caffe static compiler of my own on the path to FPGA deployment of CNN inference pipelines. I looked at halide[0] as a possible intermediate representation for CPU, GPU, and FPGA, (as a step above LLVM IR), but Likely seems like an interesting option.

[0]: http://halide-lang.org/

Targeting FPGAs is something we've been keeping our eye on as well. Most of the pieces are in place. I think the last non-trivial part is removing any malloc()/free() calls. This should be possible as the size and lifetime of memory allocations are known at compile time and can be either moved to the stack or made global as desired.

One of the reasons I opted against Halide myself was the feeling that for this domain there ought to be enough information available to the compiler to intelligently pick tiling and vectorization parameters. For example, using Polly [0]. However in practice, manual tiling and vectorization is hard to beat.

[0] http://polly.llvm.org/

Really nice project, congratulations ! I'll add a link in my post about it.