these might be worth looking into:

GitHub - rusty1s/pytorch_geometric: Geometric Deep Learning Extension Library for PyTorch 10
https://www.dgl.ai/ 2

though I don’t know which one is the standard pytorch or recommended way to process graph data (or implement their forward passes). This feels like shouldn’t be something I need to implement from scratch.

related: python - What is the standard way to batch and do a forward pass through tree structured data (ASTs) in pytorch so to leverage the power of GPUs? - Stack Overflow 1