This is the official codes for RSC: Accelerating Graph Neural Networks Training via Randomized Sparse Computations.
This code is tested with Python 3.8 and CUDA 11.0. To reproduce the results in this paper, please follow the below configuration.
- Create and activate conda environment.
conda env create -f environment.yml
conda activate graph
pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu117.html
- Build
cd src
pip install -v -e .python ./$DATASET/train_full_batch.py --conf ./$DATASET/conf/$MODEL.yaml --tune_layer_ratio --efficient_eval --cache_inter 10 --switch_time 0.8 --dynamic_ratioMODEL must be chosen from {gcn, sage, gcn2}. DATASET must be chosn from {proteins, products}.
Add the flag --amp to the above commends. You may need this for training GNNs on ogbn-products.
Our code is based on the official code of ActNN, BLPA, and GNNAutoScale.