Skip to content

MasterJH5574/tvm

Repository files navigation

DeepVisor

DeepVisor is a JIT compiler for PyTorch programs. It can extract the operator graph from PyTorch programs and optimize the graph with a wide range of deep learning graph compilers.

Installation

DeepVisor now supports Python 3.9. The support of other Python versions is working in progress.

  1. Install CUDA. CUDA 11.8 is recommended.
  2. Install dependencies:
    pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
  3. Install DeepVisor:
    pip install -e .
  4. Compile a shared library to disable Python integer cache by LD_PRELOAD. This script will generates a ``ldlong.v3.9.12.so'' file in build/ directory. You need to set the LD_PRELOAD environment variable to this file when running the PyTorch program.
    cd scripts
    ./compile_longobj.sh

Example Usage

The following script compiles and runs a simple PyTorch program with DeepVisor.

LD_PRELOAD=build/ldlong.v3.9.12.so python test/example.py

Citation

If you find DeepVisor useful in your research, please consider citing the following paper:

DeepVisor: Effective Operator Graph Instantiation for Deep Learning by Execution State Monitoring; Chen Zhang, Rongchao Dong, Haojie Wang, Runxin Zhong, Jike Chen, and Jidong Zhai, Tsinghua University; will be appeared in USENIX ATC'24.

About

Open deep learning compiler stack for cpu, gpu and specialized accelerators

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 53.3%
  • C++ 43.0%
  • Shell 0.8%
  • CMake 0.7%
  • TypeScript 0.5%
  • Cuda 0.4%
  • Other 1.3%