The graph ML library that refuses to pick sides
DGL exists because graph data doesn't fit neatly into tensors, and researchers shouldn't have to reimplement message passing from scratch every time they switch deep-learning frameworks.

What it does DGL is a Python library for deep learning on graph-structured data. It provides graph objects that live on CPU or GPU, bundling connectivity structure with node and edge features under one abstraction. The library sits atop major frameworks like PyTorch, MXNet, and TensorFlow, offering efficient message passing primitives so you don’t have to build GNN layers from scratch.
The interesting bit The framework-agnostic stance is the quiet superpower: the graph model stays the same even when the rest of your pipeline moves between PyTorch, MXNet, or TensorFlow. DGL also scales to billion-node graphs across multiple GPUs and machines, which is the unglamorous part that actually matters when your “small” graph turns out to be the entire web.
Key highlights
- Graph objects unify structure and features on both CPU and GPU
- Framework-agnostic support for PyTorch, Apache MXNet, and TensorFlow
- Built-in, customizable message passing primitives for GNNs
- DGL-Go CLI for quickly training and studying state-of-the-art GNNs
- Scales to billion-sized graphs via multi-GPU and distributed training
- Preferred platform for standard benchmarks (OGB, GNNBenchmarks) with a broad ecosystem (DGL-KE, Graph4NLP, etc.)
Verdict Researchers and engineers working with graph neural networks who want pre-built message passing and distributed training without abandoning their existing framework should look here. If your data is strictly tabular or sequential, this is not your library.
Frequently asked
- What is dmlc/dgl?
- DGL exists because graph data doesn't fit neatly into tensors, and researchers shouldn't have to reimplement message passing from scratch every time they switch deep-learning frameworks.
- Is dgl open source?
- Yes — dmlc/dgl is open source, released under the Apache-2.0 license.
- What language is dgl written in?
- dmlc/dgl is primarily written in Python.
- How popular is dgl?
- dmlc/dgl has 14.3k stars on GitHub.
- Where can I find dgl?
- dmlc/dgl is on GitHub at https://github.com/dmlc/dgl.