GithubHelp home page GithubHelp logo

walkieq / polsca Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kumasento/polsca

0.0 0.0 0.0 710 KB

Polyhedral High-Level Synthesis in MLIR

License: MIT License

Shell 3.69% C++ 63.07% Python 22.88% C 0.64% Makefile 0.28% CMake 0.81% LLVM 2.45% Dockerfile 0.51% MLIR 5.65%

polsca's Introduction

POLSCA: Polyhedral High-Level Synthesis in MLIR

Build and Test GitHub release (latest by date) GitHub GitHub issues GitHub pull requests

POLSCA used to be called Phism. There are still references to Phism in this repository. We will potentially fix them in the future.

What is Phism?

Phism is an HLS tool: it transforms C programs to hardware designs.

Phism leverages MLIR and enjoys the progressive lowering idea to build the full compilation pipeline. The ability to apply a full range of compilation transformations in an organized, layered way is what Phism stands out from other tools.

Phism optimises hardware design generation through polyhedral modelling, a powerful technique that especially good at transforming statically scheduled nested loops for better parallelism and locality.

How to build?

Prerequisites

Please find how to setup the prerequisites here.

Build LLVM

Phism uses Polygeist to process C/C++ code into MLIR. But before we built Polygeist, we need to build the LLVM package within Polygeist (polygeist/llvm-project). This LLVM package will be shared by Polygeist, Polymer (later), and Phism.

First of all, make sure you've initialized all the submodules.

git submodule update --init --recursive

You may see many submodules being synced -- don't worry, they are simply required by Pluto, the polyhedral optimizer that Phism uses.

To build LLVM, Just run the following script. It should take care of everything you need.

./scripts/build-llvm.sh

Build Polygeist

It is another one-liner:

./scripts/build-polygeist.sh

Build Polymer

Polymer provides the functionality to interact MLIR code with polyhedral scheduler.

There is also a script for you -

./scripts/build-polymer.sh

Build Phism

Finally, you're all prepared to build Phism! Just type in the following commands:

./scripts/build-phism.sh

It should run the Phism regression test in the end. And if all the tests passed, hooray!

Usage

Using Docker

This doc gives an introduction on how to run Phism with docker.

Evaluation and benchmarking

Polybench

Polybench is the major benchmark we look at. It contains 30 different examples covering programs that can be potentially optimised by polyhedral transformation. The benchmark suite is located at example/polybench, and you can find our report here.

polsca's People

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.