arrow
Return

ParDiff: Efficiently Parallelizing Reverse-Mode Automatic Differentiation with Direct Indexing

delete2026-01-01
delete0
PRE
AI
S
Shuhong Huang *
S
Shizhi Tang
Y
Yuan Wen
H
Huanqi Cao
T
Tang, Ruibai
Y
Yidong Chen
J
Jiping Yu
Y
Yang Li
C
Chao Jiang
L
Limin Xiao
J
Jidong Zhai
DOI:10.1145/3774934.3786418delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Automatic Differentiation (AD) is a technique that computes the derivatives of numerical programs by systematically applying the chain rule, playing a critical role in domains such as machine learning, simulation, and control systems. However, parallelizing differentiated programs remains a significant challenge due to the conflict between tapes (a data structure for intermediate variable storage) and summations: the differentiation process inherently introduces inter-thread summation patterns, which require prohibitively expensive atomic operations; and traditional tape designs tightly couple data retrieval with the program's control flow, preventing code restructuring needed to eliminate these costly dependencies. To address these challenges, we present ParDiff, a novel AD system with a direct-indexed tape design, which enables summation-aware loop transformations and various parallel schemes for differentiated programs. This results in a higher degree of parallelization, less synchronization, and reduced inter-thread data movement. We conduct comprehensive experiments on both multi-core CPUs and GPUs. Results show that ParDiff delivers up to 483.21x (geometric mean: 30.88x) speedup over the state-of-the-art fully-AD system, Enzyme. It also achieves a speedup of 2.05x and 2.06x over PyTorch on CPU and GPU, respectively. The source code is publicly available at https://github.com/roastduck/FreeTensor.
Keywords:
AD
Tape
Parallel Computing
Direct Indexing

Journal

P
PROCEEDINGS OF THE 31ST ACM SIGPLAN ANNUAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING, PPOPP 2026
IF:
0
Papers:
43
Citations:
0

Organization

T
tsinghua university
Scholars:
11.6W
Papers: 9.9W
Citations: 137
L
lenovo
Scholars:
131
Papers: 110
Citations: 1
U
university of aberdeen
Scholars:
1.1K
Papers: 624
Citations: 0
L
legend holdings
Scholars:
208
Papers: 177
Citations: 1
researcher View more organizations