Git Product home page Git Product logo

gencog's Introduction

GenCoG

Paper | Slides | Artifact

Introduction

GenCoG is a DSL-based approach to generating computation graphs for TVM testing. It contains (1) GenCoGL, a domain-specific language for specifying type constraints of operators, and (2) an incremental generation approach with expressivity-directed strategy and concolic constraint solving.

Contents

Dependency

First, make sure TVM is installed. GenCoG works on v0.8 and v0.9, and it may also support later versions. Then, run pip install -r requirements/core.txt to get all dependencies of GenCoG.

If you want to run the experiments in the paper, run pip install -r requirements/exp.txt to install dependencies of the baselines.

Bug Detection

Please first create a subdirectory out in the root directory of this project to store all the outputs.

Running Test

python3 run_test.py

A working directory out/run-%Y%m%d-%H%M%S will be created. Each generated program will be run in a separate process. If the process exits abnormally, the test case will be kept and the error message will also be stored. Otherwise, the case will be deleted.

Case Deduplication

python3 dedup_case.py -d ${WORK_DIR}

It deduplicates the cases with similar error messages, which indicate that they may share the same root cause.

Case Reduction

python3 reduce_case.py -d ${WORK_DIR}

It reduces each test case to a possibly simpler graph with fewer vertices.

Extension

Write Constraint Specifications for New Operators

Refer to files in gencog/op for how to write constraint specification for an operator and register it in OpRegistry.

Support New DL Compilers

Type constraints of operators in different DL compilers are possibly different. Some specifications may need to be rewritten.

A new code generator is also required for generating high-level IR for the new DL compiler, from the in-memory graph representation of GenCoG. gencog/graph/relay.py is the code generator for Relay. You can refer to this file to implement your own generator.

Citation

@inproceedings{wang2023gencog,
    author = {Zihan Wang, Pengbo Nie, Xinyuan Miao, Yuting Chen, Chengcheng Wan, Lei Bu, Jianjun Zhao},
    title = {GenCoG: A DSL-Based Approach to Generating Computation Graphs for TVM Testing},
    year = {2023},
    publisher = {ACM},
    address = {New York, NY, USA},
    doi = {10.1145/3597926.3598105},
    booktitle = {Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and 
    Analysis},
    numpages = {13},
    series = {ISSTA ’23}
}

gencog's People

Contributors

wzh99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gencog's Issues

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.