pathpy / pathpyG

GPU-accelerated Next-Generation Network Analytics and Graph Learning for Time Series Data on Complex Networks.
https://www.pathpy.net
GNU Affero General Public License v3.0
33 stars 3 forks source link

Improve CUDA performance of `PathData` class #99

Closed IngoScholtes closed 7 months ago

IngoScholtes commented 9 months ago

A major performance bottleneck in the current implementation is the use of a dictionary to store path tensors in the class PathData. This creates a huge performance overhead when using CUDA vs. CPU., as each individual tensor in the dictionary must be copied to the GPU separately.

A better solution could possibly be implemented based on the new nested tensor class available in pyTorch 2.1. This would allow to store all paths with varying lengths in a single nested tensor, i.e. we would only need a single copy operation when moving the data to the GPU.

IngoScholtes commented 9 months ago

Some good and bad news on this issue:

M-Lampert commented 8 months ago

This is outdated. For updates on this see #132