Repo for DuoReduce. We use these programs as input to test compilers and improve the debuggability of compilers
- Clone submodule:
git submodule update --init
- Clone LLVM/MLIR:
cd onnx-mlir
git clone -n https://github.com/llvm/llvm-project.git
cd llvm-project && git checkout 21f4b84c456b471cc52016cf360e14d45f7f2960 && cd ..
- Build LLVM/MLIR:
./compile_mlir.sh configure
./compile_mlir.sh build
- Clone onnx-mlir submodules:
cd onnx-mlir
git submodule update --init
- Build onnx-mlir and toy compiler:
./compile_onnxmlir.sh configure
./compile_onnxmlir.sh build
- Build CIRCT: Check the link here
The ddmin main algorithm and compilation dependency-aware algorithm are in the folder DDMIN. You can check the implementation with ddmin.py. You can run our benchmark by running
./run_ddmin.sh
It is easy to start with an example
python3 ddmin.py a.generic.mlir your_path_to_circt-opt circt-pass-test.txt 4
It means we apply delta debugging for a.generic.mlir, with possible pass in circt-pass-test.txt, and parallelize it with 4 sub-process. The general form is followed:
python3 ddmin.py your.mlir your_path_to_circt-opt your_mlir_pass.txt para_number [possible_test_script.sh]
You can add your own test oracle as a test script. It should exit 0 when it pass the oracle and exit 1 otherwise