python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 -m mlir_wheel --root-dir
mkdir build
cd build
cmake ../ -DCMAKE_PREFIX_PATH=$(python -m mlir_wheel --root-dir) -DLLVM_EXTERNAL_LIT=$(which lit)
make -j
# From project root directory (not the build directory).
pip install -e python/
TUTORIAL_OPT environment variable to point to the built tutorial-opt binary:export TUTORIAL_OPT=$PWD/build/tutorial/tutorial-opt
python tutorial/ch1-cpu-vector-dsl/square.py
The examples will print the generated MLIR at each lowering stage.
Each tutorial chapter has a README.md file explaining how to start with the exercise and some basic explanation of the exercise. For example, check out tutorial/ch1-cpu-vector-dsl/README.md
30 commits
C++
43.3%
MLIR
34.9%
Python
15.3%
CMake
6.5%
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 -m mlir_wheel --root-dir
mkdir build
cd build
cmake ../ -DCMAKE_PREFIX_PATH=$(python -m mlir_wheel --root-dir) -DLLVM_EXTERNAL_LIT=$(which lit)
make -j
# From project root directory (not the build directory).
pip install -e python/
TUTORIAL_OPT environment variable to point to the built tutorial-opt binary:export TUTORIAL_OPT=$PWD/build/tutorial/tutorial-opt
python tutorial/ch1-cpu-vector-dsl/square.py
The examples will print the generated MLIR at each lowering stage.
Each tutorial chapter has a README.md file explaining how to start with the exercise and some basic explanation of the exercise. For example, check out tutorial/ch1-cpu-vector-dsl/README.md
30 commits
C++
43.3%
MLIR
34.9%
Python
15.3%
CMake
6.5%