Code Monkey home page Code Monkey logo

heterocl's Introduction

GitHub license CircleCI

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Reconfigurable Computing

Website | Installation | Tutorials | Documentation

!! OBS !!

This fork aims at providing pre-built binaries for heterocl/hcl-dialect.

Building

Make sure you're on Ubuntu 22.04

# 1. hcl-dialect
git clone --depth 1 https://github.com/kth-sml/hcl-dialect /tmp/hcl-dialect
cd /tmp/hcl-dialect
docker/build

# 2. heterocl
git clone --depth 1 https://github.com/kth-sml/heterocl /tmp/heterocl
cd /tmp/heterocl
docker/build

# Wheels can be found in /tmp/heterocl/dist
pip install /tmp/heterocl/dist/*
  • Don't expect that these wheels will work on other systems.

Introduction

With the pursuit of improving compute performance under strict power constraints, there is an increasing need for deploying applications to heterogeneous hardware architectures with accelerators, such as GPUs and FPGAs. However, although these heterogeneous computing platforms are becoming widely available, they are very difficult to program especially with FPGAs. As a result, the use of such platforms has been limited to a small subset of programmers with specialized hardware knowledge.

To tackle this challenge, we introduce HeteroCL, a programming infrastructure comprised of a Python-based domain-specific language (DSL) and a compilation flow. The HeteroCL DSL provides a clean programming abstraction that decouples algorithm specification from hardware customizations including compute and data customizations. HeteroCL can further capture the interdependence among these different customization techniques, allowing programmers to explore various performance/area/accuracy trade-offs in a systematic and productive manner.

Language Overview

flow

Current Compilation Flow

flow

Install MLIR-based HeteroCL

To install the HeteroCL-MLIR dialect, please make sure you have installed the tools below:

  • gcc >= 5.4
  • cmake >= 3.19
  • python >= 3.7

The following script shows the complete process of building the HeteroCL-MLIR dialect and connecting it with the HeteroCL frontend. It may take about 10 minutes to install the LLVM package depending on the internet connection and the hardware resource of your machine. If you are a HeteroCL developer, please refer to the guide in the HCL-MLIR repository and build the dialect with the Python binding from source.

git clone https://github.com/cornell-zhang/heterocl.git heterocl-mlir
cd heterocl-mlir
git submodule update --init --recursive
pip install . -v
# export LLVM path
export LLVM_BUILD_DIR=$(pwd)/hcl-dialect/externals/llvm-project/build
export PATH=${LLVM_BUILD_DIR}/bin:${PATH}

To verify HeteroCL is installed correctly, you can run the following test.

python3 -m pytest test

Related Publications

Related Work

Contributing to HeteroCL

Coding Style (Python)

We follow official Python coding style and use NumPy docstring style. We use Black and PyLint to format Python code.

Coding Style (C and C++)

We follow Google coding style. Please refer to the hcl-dialect repository for more details.

heterocl's People

Contributors

chhzh123 avatar zzzdavid avatar seanlatias avatar hecmay avatar blaok avatar huyuwei avatar comaniac avatar kaarmu avatar yn224 avatar ezw2 avatar schelleg avatar jaxtonhale avatar pbc48 avatar rlin10 avatar wty5 avatar jzfengziyan avatar dependabot[bot] 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.