dmlc / HalideIR

Symbolic Expression and Statement Module for new DSLs
Other
205 stars 59 forks source link

HalideIR: Symbolic Arithmetic IR Module

HalideIR is a base module for building symbolic expression and arithmetic simplification for building new DSLs. It is isolated and refactored from part of Halide project (credit should go to the original authors). It was used in earlier versions of the tvm project.

Note that some portions of the TVM compiler outside of this folder are also adapted from Halide codebase, where we needed similar logic (e.g loop vectorization). These are commented where they occur.

Motivation

We build this component during the development of TVM project. Symbolic expression data structure and simplification libary is essential to for such compiler stack project.

Unfortunately there is no standalone module that fits our need at the moment. We find that the IR and simplification module of Halide project fits such purposes nicely. So we isolated and refactor the coresponding module into this repo.

The major goal is minimum and interpolatable with more front-end languages. HalideIR is used in TVM project. Here are the few major improvements.

Besides these changes, we also re-factored the code to resolve some of the issues in the codebase. Some of these changes addresses the pain point raised in Halide project. The detailed change are listed in the later part of the project.

Project Structure

Based on code from Halide(release_2017_05_03). The code is componetized into four logical components

Code Style

We keep old files in old code style, but use Google C style in the newly added files.

List of Changes