GithubHelp home page GithubHelp logo

brucezhan01 / caffe-fpga-opencl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlzxy/caffe-fpga-opencl

0.0 1.0 0.0 32.64 MB

CMake 0.70% Tcl 0.95% C++ 25.72% C 71.09% Makefile 0.07% Python 1.31% Objective-C 0.02% Shell 0.15%

caffe-fpga-opencl's Introduction

Caffe OpenCL FPGA

This project provides

  • Python Tool to convert your trained caffe model into JSON
  • C++ code that read in your JSON file and run it with OpenCL in:
    • CMakeLists.txt for cpu in any OS
    • Makefile for mac CPU
    • Makefile for Nvidia GPU
    • Tcl building script for Xilinx FPGA
    • (Sorry for no altera support right now, but I assume it could be extended easily)

Send an issue if you have any problems, or email me if you want to collaborate.

How to Use

Here is a brief intro & example.

How to Optimize

Some notes

How to Contribute

Some notes explaining this code base structure, which is helpful to you ๐Ÿ˜„ And two "how to add new feature" provided

Limitation

This project is experimental at this moment, it has following (big) ๐Ÿ’” limitations:

  • Current only support limited layer types

    • Conv
    • Pooling
    • Relu
  • Don't support mergeLayer, concatLayer that accepts multiple inputs, although they can be added with some work.

  • The on-chip buffer size has to be the maximum feature map size among all layers, which is not efficient at all. But it's difficult to do further trick on memory transfer under the FPGA OpenCL framework.

    Because you can't implement a kernel to do a half convolution ๐Ÿ˜ž and data transmission is per-kernel and controlled by API.

    I am willing to listen to your ideas.

TODO

Here are some of my thoughts in the top todo list.

  • Contact Xilinx Support/Work with others to solve the on-chip cache buffer.
  • Apply some optimizing attributes for benchmarking, which could be good examples for optimization.
  • Implement mergeLayer/concatLayer, then it will basically be able to handle arbitrary structure network.
  • This project may be useful for an research about OpenCL FPGA design parameter tuning for neural network application, which is worthy to dig in ๐Ÿ˜ƒ

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.