Skip to content

stefanvanberkum/TorchGNN-GCN

Repository files navigation

TorchGNN-GCN

Integrated example of GNN functionality in ROOT's TorchGNN.

Dependencies

  • A Python virtual environment with:
    • PyTorch
    • PyTorch Geometric
    • ROOT
  • C++
    • LibTorch: Can be downloaded from the PyTorch homepage. We used version TorchLib 2.0.1 ( cxx11 ABI).
    • BLAS: We used OpenBLAS.
    • PyTorch Scatter: See installation instructions at the PyTorch Scatter repository.
    • PyTorch Sparse: See installation instructions at the PyTorch Sparse repository.
      • Make sure that the third-party library parallel-hashmap is included in the third_party directory.

Both PyTorch Scatter and Sparse can be installed in the following way:

cd source_code_directory
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="path/to/libtorch" -DCMAKE_BUILD_TYPE="Release" ..
make
make install

How to run

The model can be trained and parsed by running the Python code GNN_generator.py.

The C++ benchmarking code main.cxx can be compiled and run in the following way:

cd code_directory
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="path/to/libtorch" -DCMAKE_BUILD_TYPE="Release" ..
make
export OMP_NUM_THREADS=1
./TorchGNN

Alternatively, one can use the provided bash script collect_statistics.sh, to collect all statistics mentioned in the report. Make sure to change the CMAKE_PREFIX_PATH variable and activate the virtual environment before calling the bash script.

About

Integrated example of GCN functionality in ROOT's TorchGNN.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published