GraphNet: A Large-Scale Computational Graph Dataset for Tensor Compiler Research

Xinqi Li, Yiqun Liu, Shan Jiang, Enrong Zheng, Huaijin Zheng, Wenhao Dai, Haodong Deng, Dianhai Yu, Yanjun MaarXiv 2025

TL;DR

The authors introduce GraphNet, a large-scale dataset of 2.7K real-world deep learning computational graphs across multiple frameworks, designed to systematically benchmark tensor compilers. Alongside the dataset, they propose two novel evaluation metrics, the Speedup Score ($S_t$) and Error-aware Speedup Score ($ES_t$), which uniquely balance execution speedup, numerical correctness, and specific failure modes to help developers pinpoint compiler bottlenecks.

What Problem Does This Paper Address?

Deep learning relies heavily on high-performance hardware execution, which is increasingly managed by tensor compilers (like TVM, XLA, or TorchInductor) that translate high-level computational graphs into optimized backend code. However, evaluating these compilers is notoriously difficult. Existing benchmarks are often small, hand-picked, and framework-specific.

Crucially, standard benchmarking typically looks only at raw speedup, ignoring whether the compiled model actually produces correct numerical results or suffers from silent performance degradation and compilation crashes. There is a clear need for a standardized, large-scale, cross-framework dataset and a holistic evaluation metric that penalizes correctness violations and failures.

Methods

The paper introduces an automated compiler evaluation pipeline and two new metrics:

  1. Graph Extraction & Validation: Using lightweight Python decorators, the pipeline traces and captures dynamic computational graphs directly from real-world models. To ensure dataset quality, a rigorous 4-step validation loop re-extracts and re-executes the graphs, checking for structural and node-level consistency while filtering out duplicates via graph hashing.
  2. Speedup Score ($S_t$): A unified metric that combines three components: the geometric mean speedup of correct executions, an exponential penalty for "negative optimizations" (where compilation makes execution slower), and a fixed penalty for failures (crashes or tolerance violations) under a tunable numerical tolerance threshold $t$.
  3. Error-aware Speedup Score ($ES_t$): An extension of $S_t$ designed for compiler developers. By mapping positive values of $t$ to discrete error types (e.g., $t \ge 1$ tolerates accuracy mismatches, $t \ge 2$ tolerates runtime crashes, and $t \ge 3$ tolerates compilation failures), it allows developers to systematically eliminate penalties and isolate exactly which phase of the compiler is causing performance drops.

Datasets

The authors introduce GraphNet, which contains over 2.7K real-world computational graphs extracted from actively maintained community libraries in PaddlePaddle (e.g., PaddleNLP, PaddleX) and PyTorch (e.g., TorchVision, timm). The dataset spans six major task categories: Computer Vision (CV), Natural Language Processing (NLP), Audio, Multimodal, Scientific Computing, and others. Model scales range up to 10 billion parameters, supporting multiple precisions like FP32, FP16, and BF16.

Figure 1: Statistical properties of the GraphNet dataset. (a) The distribution of computational graphs across six major task categories, showing that Computer Vision (47.8%) and Natural Language Processing (39.5%) are the dominant domains. (b) and (c) Histograms showing the distribution of operator counts (on a log2 scale) for CV and NLP models, respectively. Both categories show a high concentration of graphs with operator counts around 29 (512).

Key Insights and Ideas

  • Correctness Matters as Much as Speed: Evaluating a compiler solely on execution time is deceptive if it introduces numerical drift or fails silently. The tunable tolerance parameter $t$ reveals how robust a compiler's optimizations are under strict vs. relaxed precision constraints.
  • Unmasking "Negative Optimization": Compilers don't always make things faster; sometimes graph fusion or scheduling overhead results in slower execution than the uncompiled Eager mode baseline. GraphNet's metrics explicitly isolate and penalize these slowdowns.
  • Isolating Root Causes of Failure: By transitioning from $S_t$ to $ES_t$, developers can see step-function jumps in performance scores. A jump at a specific error-tolerance level immediately tells the developer whether their compiler is primarily struggling with numerical accuracy, runtime stability, or frontend compilation errors.

Key Results

The authors benchmarked the default compilers for PaddlePaddle (CINN) and PyTorch (TorchInductor) on CV and NLP workloads using an NVIDIA H20 GPU:

  • NLP Workloads: Both compilers performed exceptionally well. Under strict tolerances, scores were low, but they rose sharply around $t \in [-6, -5]$, converging to a peak speedup score of $S_t \approx 1.2$ at $t=0$.
  • CV Workloads: TorchInductor (PyTorch-CV) struggled significantly, plateauing at a maximum $S_t \approx 0.8$. By looking at the $ES_t$ metric, the authors discovered a massive jump at $t=3$, proving that a large portion of CV samples were failing during the compilation stage itself. Furthermore, even when all failures were ignored, its raw speedup score hovered around 1.0, indicating widespread negative optimizations.
Figure 2: Speedup Score St on NVIDIA H20 for CV and NLP workloads. The vertical axis shows St, which integrates speedup, pass rate, and failure penalties into a unified score. Higher St indicates better compiler performance under the correctness-aware speedup metric defined in Equation 1. The horizontal axis t represents different numerical tolerance levels used for correctness checks, where larger t implies more relaxed thresholds.
Figure 3: Error-aware Speedup Score ESt for CV and NLP workloads. The vertical axis shows ESt values, capturing compiler performance with increasing fault tolerance. Higher ESt indicates better compiler performance under the error-tolerant speedup metric defined in Equation 3. The horizontal axis t represents different tolerance levels: for t ≤0, it reflects numerical correctness thresholds (as in St); for t > 0, it encodes the categories of tolerated errors: t ≥1 tolerates accuracy mismatches, t ≥2 tolerates runtime crashes, and t ≥3 tolerates compilation failures.

Limitations and Future Work

  • Framework and Hardware Constraints: GraphNet currently only supports PaddlePaddle and PyTorch graphs evaluated on NVIDIA GPUs (H20, A100). The authors plan to expand to TensorFlow, JAX, and MindSpore, as well as alternative hardware like TPUs and NPUs.
  • Graph Features in Progress: Two of the five core dataset constraints—Decomposable (splitting full graphs into independent optimization subgraphs) and Custom Operator Accessible (modular tracing of user-defined operators)—are still under active development.
  • No Distributed Support Yet: The current dataset does not capture communication operators or optimizations required for large-scale distributed multi-GPU systems, which is a key target for their future roadmap.

Summary updated

BibTeX
@misc{li2025graphnet,
  author = {Xinqi Li and Yiqun Liu and Shan Jiang and Enrong Zheng and Huaijin Zheng and Wenhao Dai and Haodong Deng and Dianhai Yu and Yanjun Ma},
  title = {{GraphNet: A Large-Scale Computational Graph Dataset for Tensor Compiler Research}},
  year = {2025},
  eprint = {2510.24035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.24035},
}
Figure