https://github.com/finch-tensor/finch-mlir
Rewriting Finch in mlir
https://github.com/finch-tensor/finch-mlir
Last synced: 3 months ago
JSON representation
Rewriting Finch in mlir
- Host: GitHub
- URL: https://github.com/finch-tensor/finch-mlir
- Owner: finch-tensor
- Created: 2024-07-06T20:49:47.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T20:25:00.000Z (3 months ago)
- Last Synced: 2025-04-10T21:23:11.613Z (3 months ago)
- Language: MLIR
- Size: 155 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An out-of-tree MLIR dialect
This is an example of an out-of-tree [MLIR](https://mlir.llvm.org/) dialect along with a finch `opt`-like tool to operate on that dialect.
## Install
0. Do a recursive clone
```sh
git clone --recursive https://github.com/finch-tensor/Finch-mlir.git
```Or if you have already cloned this repository, run
```sh
git submodule init --update --recursive
```This will take some time as it perform a shallow-clone of LLVM.
1. Install prerequisites to build the dialect and the Python bindings:
1a. Use your system package manager or `conda` to install a C/C++ compiler and CCache.
1b. Install the build-time Python requirements:
```sh
# Generate the build requirements dynamically from `pyproject.toml` and install them.
./scripts/install_build_reqs.sh
```2. Build the wheel or install the package:
```sh
python -m build --no-isolation
```OR
```sh
pip install --no-build-isolation .
```
In theory, the `--no-[build-]isolation` flag is unnecessary, but it caches the LLVM build which can greatly speed-up the buid process on repeated runs.## Run Tests
One can run the tests once the wheel is built and/or the package is installed with```sh
cmake --build build --target check-finch
```Assuming the CMake configure step doesn't need to run.