Giter VIP home page Giter VIP logo

graphiler's Introduction

Graphiler

DOI

Graphiler is a compiler stack built on top of DGL and TorchScript which compiles GNNs defined using user-defined functions (UDFs) into efficient execution plans. This allows creating high performance models while retaining the simplicity and expressiveness of the UDF interface.

Repo Structure

Graphiler
├── artifact                # scripts for running the artifact
├── docker
├── examples                # GNN models with different implementations
│   ├── GAT
│   ├── GCN
│   ├── HGT
│   └── RGCN
├── include
│   ├── dglgraph.h          # simplified Graph representation
│   └── mpdfg.h             # message passing data flow graph
├── python
│   ├── graphiler           # python wrapper
│   └── ...
└── src                     # source codes
    ├── builder             # MP-DFG builder
    ├── dglgraph.cpp
    ├── ops                 # graph primitives
    │   ├── broadcast
    │   ├── dgl_primitives
    │   │   ├── sddmm.cu
    │   │   ├── spmm.cu
    │   │   └── ...
    │   ├── segment_mm
    │   └── segment_softmax
    │   └── ...
    ├── optimizer           # optimization passes
    │   ├── dedup.cpp
    │   ├── fusion.cpp
    │   ├── optimizer.h
    │   ├── reorder.cpp
    │   └── split.cpp
    │   └── ...
    └── ...

Build Graphiler and get started

Play with docker

Docker is the easiest way to build the environment and reproduce the results. To make use of it, please make sure docker and NVIDIA Container Toolkit are properly installed and configured.

You can either build the image by yourself:

docker build -f docker/Dockerfile -t graphiler .

Or directly pull an pre-built image from docker hub:

docker pull expye/graphiler-ae:latest
docker tag expye/graphiler-ae:latest graphiler

To quickly verify the installation:

docker run --gpus all -i -t graphiler python examples/GAT/GAT.py pubmed 500

Build from scratch

You can follow these instructions to build Graphiler on your machine:

# To install CUDA 11.1:
# https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html 
git clone https://github.com/xiezhq-hermann/graphiler.git
cd graphiler
pip install -r requirements.txt # install PyTorch, DGL, PyG, etc
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH="$(python -c 'import torch.utils; print(torch.utils.cmake_prefix_path)')" ..
make
mkdir -p ~/.dgl
mv libgraphiler.so ~/.dgl/
cd ..
python setup.py install
# path used in scripts
export GRAPHILER=$(pwd)

# quick sanity check
python $GRAPHILER/examples/GAT/GAT.py pubmed 500

Artifact Evaluation

Please go artifact directory for more information.

Reference

To cite Graphiler in your paper:

@inproceedings{graphiler,
 author = {Xie, Zhiqiang and Wang, Minjie and Ye, Zihao and Zhang, Zheng and Fan, Rui},
 booktitle = {Proceedings of Machine Learning and Systems},
 editor = {D. Marculescu and Y. Chi and C. Wu},
 pages = {515--528},
 title = {Graphiler: Optimizing Graph Neural Networks with Message Passing Data Flow Graph},
 url = {https://proceedings.mlsys.org/paper/2022/file/a87ff679a2f3e71d9181a67b7542122c-Paper.pdf},
 volume = {4},
 year = {2022}
}

graphiler's People

Contributors

xiezhq-hermann avatar yzh119 avatar

Stargazers

 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.