- Cite this project and paper.
@inproceedings{TC-GNN,
title={TC-GNN: Accelerating Sparse Graph Neural Network Computation Via Dense Tensor Core on GPUs},
author={Yuke Wang and Boyuan Feng and Zheng Wang and Guyue Huang and Yufei Ding},
booktitle={USENIX Annual Technical Conference},
year={2023}
}
- Clone this project.
git clone [email protected]:YukeWang96/TCGNN-Pytorch.git
- OS & Compiler:
Ubuntu 16.04+
gcc >= 7.5
cmake >= 3.14
CUDA >= 11.0
andnvcc >= 11.0
config.py
: the configuration file for the shape of a TC block.bench.py
: the benchmark file for invokingmain_tcgnn.py
for various datasets and models.main_tcgnn.py
: the main entry for running TC-GNN.count_TC_blocks.py
: counting the total number of TC blocks without sparse-graph translation.proc_prof.py
: get the detailed GPU kernel metrics from the ncu csv output.TCGNN_conv/
: the directory for core TC-GNN implementations, includingTCGNN_kernel.cu
andTCGNN.cpp
.
- Go to
Docker/
- Run
./build.sh
- Run
./launch.sh
- Install
conda
on system Toturial. - Create a
conda
environment:
conda create -n env_name python=3.6
- Install
Pytorch
:
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
or using pip
[Note that make sure the pip
you use is the pip
from current conda environment. You can check this by which pip
]
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
- Install
Deep Graph Library (DGL)
.
conda install -c dglteam dgl-cuda11.0
pip install torch requests tqdm
- Install
Pytorch-Geometric (PyG)
.
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cu111.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+cu111.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.8.0+cu111.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.8.0+cu111.html
pip install torch-geometric
Go to TCGNN_conv/
, then run
./build.sh
to install the TCGNN_conv modules with Pytorch binding. Note that this step is required for both Docker and Conda setup.
Get the preprocessed datasets in .npy
at here,
then run
wget https://storage.googleapis.com/graph_dataset/tcgnn-ae-graphs.tar.gz
tar -zxvf tcgnn-ae-graphs.tar.gz
- Go to
pyg_baseline/
directory;- Pass the
--model
parameter inpyg_main.py
withgcn
andgin
to profile the example GCN and GIN model, respectively;./0_bench.py| tee run_pyg.log
to run the script and the report 10 epoch runtime for all evaluated datasets../1_log2csv.py
to convert therun_pyg.log
torun_pyg.csv
for ease of analysis.
- Go to
dgl_baseline/
directory- Pass the
--model
parameter indgl_main.py
withgcn
andgin
to profile the example GCN and GIN model, respectively;./0_bench.py| tee run_dgl.log
to run the script and the report 10 epoch runtime for all evaluated datasets../1_log2csv.py
to convert therun_dgl.log
torun_dgl.csv
for ease of visualization.
- Under the current project directory
./0_bench.py| tee run_TCGNN.log
to run the script and the report 10 epoch runtime for all evaluated datasets../1_log2csv.py
to convert therun_TCGNN.log
torun_TCGNN.csv
for ease of analysis.