Git Product home page Git Product logo

mlir-fuzz's Introduction

Fuzzing tools for MLIR

The project is highly experimental, and is not currently meant to be used. It aims at deriving fuzzers, reducers, or mutators for MLIR dialects, using IRDL and to avoid generating programs that do not verify.

Building

  • Setup LLVM and IRDL projects
    • git submodule update --init --recursive
    • ./utils/build-llvm.sh
  • Setup CMake
    • ./utils/setup.sh
  • Build the different tools (only mlir-enumerate for now)
    • ./utils/build.sh

Running

First create the generation dir: mkdir generated.

./build/bin/mlir-enumerate dialects/arith.mlir -o generated will run the enumerator with the arith dialect, and generate the programs in the generated folder.

Testing MLIR code with xDSL-smt

The xdsl-smt project has a translation validation tool for arith that we can use to test random programs. The run_xdsl_tv.py script will run the translation validation tool on randomly generated programs.

# Install xdsl-smt in a virtual environment
cd PATH_TO_XDSL_SMT
python -m venv venv
source venv/bin/activate
pip install -e .

# Generate random programs and run the translation validation tool
cd PATH_TO_MLIR_FUZZ
python run_xdsl_tv.py

To test different passes, modify the is-miscompiling.sh script.

mlir-fuzz's People

Contributors

math-fehr avatar hatsunespica avatar syheliel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.