# Tiramisu Compiler: a polyhedral C++ API for portable data-parallel code

> Tiramisu-Compiler/tiramisu is an MIT-licensed C++ compiler that turns algorithm expressions plus scheduling hints into CPU, CUDA, FPGA or MPI code. Its build is the hard part, and the README is thin on rollback and versioning.

**Tiramisu-Compiler/tiramisu** — A polyhedral compiler for expressing fast and portable data parallel algorithms

- Repository: https://github.com/Tiramisu-Compiler/tiramisu
- Website: http://tiramisu-compiler.org
- Stars: 961 · Forks: 139
- Language: C++
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/tiramisu-compiler-tiramisu

## What Tiramisu solves, and who it is aimed at

The problem is the gap between a loop nest you can read and a loop nest that runs well on a specific chip. Writing the readable version and letting a general-purpose compiler optimize it is unreliable for stencil, tensor and deep learning kernels, because the transformations that matter (tiling, fusion, vectorization, parallelization, memory layout) depend on knowledge a compiler usually does not have. Tiramisu's answer is to let you write the algorithm and the schedule in the same C++ program. The README describes it as a compiler for expressing fast and portable data parallel computations, with a C++ API for expressing algorithms and how they should be optimized.

The intended audience is narrow. You need to be comfortable in C++, willing to build a toolchain from source, and working on kernels where loop structure is the bottleneck. The README lists linear and tensor algebra, deep learning, image processing, stencil computations and machine learning as target areas. If your work is mostly glue code, data loading or model definition in a framework, this is a layer below what you need.

## The mechanism: expressions, schedules, then codegen

A Tiramisu program is built from three kinds of object. Iterator variables define iteration domains, computations define what is written, and buffers define where values live. The README example declares var i("i", 0, 100) and var j("j", 0, 100), then a computation C over that domain, then applies C.parallelize(i) and C.vectorize(j, 4) to describe the schedule. Only at the end does C.codegen({&b_C}, "generated_code.o") produce an object file.

That ordering is the whole design. The compiler sits on the polyhedral model, which represents the loop nest and its transformations as integer sets and maps, so a large class of loop optimizations and data layout transformations can be expressed and composed before any target-specific code is emitted. The README states the current targets are multicore x86 CPUs, Nvidia GPUs, Xilinx FPGAs through Vivado HLS, and distributed machines using MPI, and that the design is meant to make adding code generators for new architectures easy. In practice this means the schedule you write is target-independent and the backend decides how to lower it, which is why the same expression can be retargeted without rewriting the loop structure.

## Installing Tiramisu and generating a first kernel

The README gives three build methods. The shortest is spack, which builds everything from source for you. The other two differ only in how dependencies are set up: system package managers (Homebrew or Apt), or the repository's own install script. The script route compiles ISL, LLVM and Halide as submodules and the README warns this may take between a few minutes and a few hours, with LLVM the expensive part.

The spack path is one command. According to the README, it installs Tiramisu and its dependencies from source.

```bash
spack install tiramisu
```

If you prefer the system package manager route on Ubuntu or Debian, the README lists LLVM 14 packages and the ISL development package. Note the version: the instructions pin LLVM 14, not a newer release.

```bash
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14 all
sudo apt-get install liblld-14-dev llvm-14-runtime
sudo apt-get install libllvm14 llvm-14-dev
sudo apt-get install halide
sudo apt-get install libisl-dev
```

Then clone the repository and configure with CMake, pointing it at the ISL directories you found with dpkg -L libisl-dev. The README shows this configure invocation, and adds that you should append CMAKE_INSTALL_PREFIX if you want to install rather than build in place.

```bash
git clone https://github.com/Tiramisu-Compiler/tiramisu.git
cd tiramisu
mkdir build
cmake . -B build -DISL_LIB_DIRECTORY=$ISL_LIB_DIRECTORY -DISL_INCLUDE_DIRECTORY=$ISL_INCLUDE_DIRECTORY -DPython3_EXECUTABLE=`which python3`
cmake --build build
```

The first real use is the README's own example. It initializes a function named foo, declares a 100 by 100 domain, creates computation C, parallelizes the outer loop, vectorizes the inner loop by 4, stores the result in a p_int32 output buffer, and writes generated_code.o. What you should see after a successful build is that object file, produced by the codegen call rather than by a separate driver program. There is no CLI in the README: the entry point is a C++ function you call from your own code.

## The build is the real barrier, and the release history shows it

The two published releases are V0.1 from 2018-07-17 and V0.2 from 2018-07-26. There has been nothing since, even though the repository's last push was on 2026-07-21. That combination tells you what to expect: ongoing work on master, no versioned artifact to depend on. If your project needs a tagged release with a changelog, Tiramisu does not offer one, and you will be pinning a commit hash instead.

The dependency chain is the second barrier. LLVM, Halide and ISL are all pulled in, and the README's Ubuntu instructions fix LLVM at version 14. The build is described as tested on Linux Ubuntu 18.04 and MacOS 13.0.1, with a note that it should work on other versions. Nothing in the README documents a rollback procedure, a supported-compiler matrix beyond those two, or what happens when your system LLVM is a different major version. The optional backends add their own conditions: USE_GPU, USE_MPI and USE_AUTO_SCHEDULER are set in configure.cmake, and the README says you will be prompted for the CUDA library path if it is not found automatically. That is a reasonable amount of documentation for a research compiler and a thin amount for a production dependency.

## Where Tiramisu is the wrong tool

If you are not writing C++, stop here. The Python bindings exist (Python 3.8 or higher, along with Pybind 2.10.2, Cython and Numpy, per the README), but the API described in the README is C++ and the examples are C++. A Python-first workflow gets a second-class entry point into a compiler whose scheduling concepts are expressed in C++ types.

If your target is not one of the four listed backends, you are writing a code generator, not using a tool. The README frames new-architecture support as an integration task, which is honest but also a warning: there is no generic fallback that will make an unsupported accelerator fast. And if your kernels are already handled well by a vendor library or a framework's own code generation, Tiramisu adds a build dependency and a scheduling language in exchange for control you may not need. The README does not claim to beat anything; it claims to express a large set of loop optimizations and data layout transformations, and that claim is about expressiveness, not measured speed.

## Halide as the alternative, and the difference that matters

Halide is the obvious comparison, and Tiramisu's own build instructions install it as a dependency. The difference is in what the schedule can say. Halide's model is a pipeline of functions with a schedule expressed through its own C++ embedded language, and it is widely used for image processing pipelines. Tiramisu works on the polyhedral model, which represents iteration domains and access relations as integer sets and maps. That representation is what lets it apply transformations such as skewing and fusion in a composable way and reason about them formally, and it is also why ISL is a hard dependency of the build.

The practical consequence: if your problem is a stencil or a dense linear algebra kernel where the interesting question is how loop iterations map onto a memory hierarchy, the polyhedral formulation is the point. If your problem is a media pipeline where the interesting question is where to compute each stage and how to store intermediate buffers, Halide's model maps more directly and you avoid the ISL dependency entirely. Tiramisu also lists FPGA and MPI targets, which is a different reach than a CPU/GPU pipeline compiler.

## Licence, maintenance and upgrade cost

Tiramisu is MIT licensed, which is permissive: you can use, modify and redistribute it, including in closed products, provided the copyright notice and permission notice are preserved. That is the extent of what the repository states; it is not legal advice, and if you are shipping generated code inside a product, the licences of the dependencies you build against (LLVM, Halide, ISL) are a separate question you have to check yourself.

Upgrade cost is the part to plan for. With no release after V0.2 in 2018, there is no upgrade path in the usual sense, only a decision about which commit to track. The README's build instructions are tied to specific dependency versions (LLVM 14, Pybind 2.10.2, Python 3.8 or higher), so moving to a newer LLVM is an untested change from the documentation's point of view. The repository does carry INSTALL.md, README.distributed.md and configure.cmake, which is more setup documentation than the README alone shows, and anyone committing to Tiramisu should read those before starting the build rather than after it fails.

## Conclusion

Adopt Tiramisu if you are writing loop-heavy tensor, stencil or deep learning kernels in C++ and want scheduling decisions expressed in code rather than in a separate tool. Do not adopt it if you need a stable release cadence or a documented rollback path: the newest release is V0.2 from 2018-07-26, so pin a commit and expect to build LLVM, Halide and ISL yourself. Verify first that the ISL include and library directories resolve on your machine, that your LLVM version matches the one the build expects, and whether you need USE_GPU or USE_MPI set in configure.cmake before you configure.

## FAQ

### What is the Tiramisu compiler used for?

It is a compiler for expressing fast and portable data parallel computations, with a C++ API for writing algorithms and their optimizations. The README lists linear and tensor algebra, deep learning, image processing, stencil computations and machine learning as application areas.

### How do I install the Tiramisu compiler?

The README gives three routes: spack install tiramisu, building from source with system package managers for the dependencies, or building purely from source using the repository's install_submodules.sh script. The script route compiles ISL, LLVM and Halide and the README notes it may take from a few minutes to a few hours.

### Which hardware targets does Tiramisu generate code for?

The README states it currently targets multicore x86 CPUs, Nvidia GPUs, Xilinx FPGAs through Vivado HLS, and distributed machines using MPI. GPU and MPI support are optional and are enabled through variables in configure.cmake.

### Does Tiramisu have a versioned release I can depend on?

The most recent release is V0.2 from 2018-07-26, preceded by V0.1 on 2018-07-17. Development has continued on the master branch since then, so pinning a commit is the practical alternative to a tagged release.

### What are the prerequisites for building Tiramisu?

The README lists CMake 3.22 or greater, Autoconf and libtool, and Ninja as required. OpenMPI, the CUDA Toolkit, and Python 3.8 or higher with Pybind 2.10.2, Cython and Numpy are optional and depend on which backends and bindings you want.

## Sources

- [License: MIT](https://github.com/Tiramisu-Compiler/tiramisu/blob/master/LICENSE)
- [Project website](http://tiramisu-compiler.org)
- [README](https://github.com/Tiramisu-Compiler/tiramisu/blob/master/README.md)
- [Releases](https://github.com/Tiramisu-Compiler/tiramisu/releases)
- [Tiramisu-Compiler/tiramisu on GitHub](https://github.com/Tiramisu-Compiler/tiramisu)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tiramisu-compiler-tiramisu
