Giter Club home page Giter Club logo

hasco's Introduction

HASCO

Introduction

Tensor computation is fundamental for many scientific and engineering applications, such as machine learning, data mining, quantum chemistry. Though dedicated hardware and software optimizations have progressed considerably for tensor computation, they primarily focus on either the hardware part or the software part. Optimizing the two parts in isolation inevitably suffers from sub-optimal solutions confined in a local design space.

While seemingly appealing, there has been less attention on hardware/software co-design for tensor computation. This is largely because the design of hardware and software components influence each other, and the joint design space can be huge. A general approach to tackle the co-design problem is to develop a unified intermediate representation (IR), based on which designers can partition the hardware and software, optimize, and synthesize the hardware and software. However, developing such a general IR and synthesizing arbitrary hardware are challenging.

We provide a co-design approach specific to tensor computation โ€”โ€” HASCO. As tensor computation can be described using nested loops, we naturally embed loop information into our IR design for tensor computation partitioning, optimization, and implementation. A subset of the loops are implemented using spatial hardware accelerators, and the remaining loops are implemented using software programs. The fundamental questions are: 1) how to define the interface between the hardware accelerators and the software programs, 2) how to navigate the huge design space for each part. HASCO solves these questions with efficient algorithms.

Installation

Requires: Python >= 3.5, packages (numpy, tqdm, json, csv), Ax, Maestro, and TVM are integrated into HASCO as submodules. Note that we specify Ax and TVM versions for our developing purpose. Other verisons are not tested or guaranteed yet.

  1. Clone this repo.
   git clone --recursive https://github.com/pku-liang/HASCO.git HASCO
  1. Install TVM from HASCO/src/tvm. The instructions are given here.
  2. Compile Maestro from HASCO/src/maestro following these instructions. Then, edit the maestro_home here, if necessary.
  3. Intall Ax from HASCO/src/Ax.
   python setup.py install

You can also use docker like this if you find trouble in the installation.

Tests

We have built a number of examples in testbench. To run an example,

   python testbench/co_resnet_conv.py

You can also build your testcases following our examples.

Notices

This version evaluates HASCO-generated solutions with the Maestro tool. We can also use our model TENET in the further vesions. Profiling metrics from hardware prototypes can be supported by integrating our hardware generator TensorLib.

Citing HASCO

If you find HASCO useful for your project, please cite our paper.

@INPROCEEDINGS{xiao2021hasco,
  author={Xiao, Qingcheng and Zheng, Size and Wu, Bingzhe and Xu, Pengcheng and Qian, Xuehai and Liang, Yun},
  booktitle={2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA)}, 
  title={HASCO: Towards Agile HArdware and Software CO-design for Tensor Computation}, 
  year={2021},
  volume={},
  number={},
  pages={1055-1068},
  doi={10.1109/ISCA52012.2021.00086}} 

You can also find the arxiv version here.

hasco's People

Contributors

walkershaw avatar knowingnothing avatar

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.