Giter Club home page Giter Club logo

4paradigm / canopy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/tvm

11.0 2.0 1.0 40.45 MB

Canopy is a machine learning learning compiler stack with the capability of adopting high-end FPGAs. As a part of OpenAIOS project, Canopy is an evolved version of Apache TVM. Canopy is able to support a variety of hardware backends such as PCIE-based cloud FPGAs, CPUs and GPUs.

License: Apache License 2.0

Python 52.52% Makefile 0.24% C++ 40.50% C 0.98% Shell 0.81% CMake 0.69% Objective-C 0.09% Objective-C++ 0.28% JavaScript 0.07% HTML 0.01% Java 0.97% Rust 1.77% Go 0.54% RenderScript 0.01% Cuda 0.05% TypeScript 0.46% Batchfile 0.02%
machine-learning performance deep-learning metal compiler gpu fpga opencl tvm

canopy's Introduction

logo

Canopy: FPGA-Accelerated Deep Learning Compiler Stack

Introduction

Canopy is an evolved version of Apache TVM developed by 4Paradigm. TVM is an open-source deep learning compiler stack that supports a variety of hardware backends, such as CPUs, GPUs, and FPGAs. However, the supported FPGA is only limited to SoC FPGAs with the shared memory space between an ARM core and FPGA. Based on such a hardware architecture, modern high-end PCIE-based cloud FPGAs cannot take advantage from TVM because of the separate memory space between the host and FPGA. Therefore, the major purpose of Canopy project is to enable the open-source deep learning compiler stack to run efficiently on PCIE-based high-end FPGAs. Compared with TVM, there are three major contributions:

  • We have designed the PCIE driver to adapt to the TVM framework, which makes it possible to work with PCIE-based FPGA cards.
  • We have defined and implemented the underlying FPGA-based accelerator using high-level synthesis languages OpenCL. Therefore, any hardware accelerators with OpenCL support can be integrated into Canopy with minimum code modification efforts.
  • We have extended and fixed a few issues from TVM to make it support FPGA smoothly.

As a result, Canopy is able to compile and run deep learning models on PCIE-based high-end FPGAs. Our design supports both Intel and Xilinx's FPGAs, and has been tested on Intel Arria 10, Stratix 10, and AWS F1 instances (with Xilinx Virtex UltraScale+).

Note that we have open-sourced the baseline version of Canopy. For any commercial supports, customized design, and further improvement, please contact 4Paradigm: LU Mian [email protected]

Hardware Implementation

Similar to TVM and VTA, the hardware implementations (including Intel FPGAs and Xilinx FPGAs) are hosted in another repository canopy-hw: https://github.com/4paradigm/canopy-hw

Contribution to Apache TVM

This repository is forked from Apache TVM (https://github.com/apache/tvm). We greatly appreciate the significant work done by the TVM team that has defined a neat but yet flexible design for deep learning compiler and accelerator research. Meanwhile, we have been contributing most of our work into the TVM community. To understand what we have proposed to the TVM community, please refer to the following RFC and discussion.

According to the RFC, we have submitted tens of PRs to the TVM community (dated Dec 2020) and more ongoing.

However, a more efficient hardware design as well as the Xilinx FPGA support are included only in this repository. We strongly recommend you to start your evaluation on AWS EC2 F1 instances as following, which is easy to develop, compile, and deploy your models.

Evaluation on Amazon EC2 F1 Instances

We have packed Canopy with relevant environment dependencies into a single package, you can easily try it on AWS F1 instance to start your evaluation!

  1. Download the package (canopy_aws.tar.gz) from here: https://drive.google.com/file/d/15G_kJDtVMEYwkKbP-tzfIyR0vgSOL_FE/view?usp=sharing
  2. Open the AWS console, and launch your instance by choosing FPGA Developer AMI from AWS Marketplace. Note that your instance type should be f1 (f1.2xlarge, f1.4xlarge, or f1.16xlarge) and the region should be US West (Oregon) \<us-west-2\>.
  3. Open your terminal, and go to the home directory (should be /home/centos by default), upload your package to the home directory.
  4. Decompress the file canopy_aws.tar.gz under the home directory (/home/centos, this is important), now you will find a README.md under the home directory, just follow the instructions to try it.

Workshop Talks

https://www.youtube.com/watch?v=6Qg7R6EuAjE

Development Team

Canopy is an open-source project developed by the HPC team of 4Paradigm. For any technical feedbacks, please contact the authors: ZHANG Hao: [email protected] LI Jiashu: [email protected] LU Mian: [email protected]

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.