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
Chao Jiang cover
Chao Jiang (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.9W
Papers: 10.0W
Citations: 137
L
lenovo
Scholars:
131
Papers: 110
Citations: 1
U
university of aberdeen
Scholars:
1.3K
Papers: 733
Citations: 0
L
legend holdings
Scholars:
208
Papers: 177
Citations: 1
researcher View more organizations
Cited Papers

Cited Papers

Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering
err2022-07-22
err61
errOAAI
errJakob, Wenzel; Speierer, Sebastien; Roussel, Nicolas; Vicini, Delio
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Advances in Neural Rendering
err2022-05-24
err0
errOAAI
errA. Tewari; J. Thies; B. Mildenhall; P. Srinivasan; E. Tretschk; W. Yifan; C. Lassner; V. Sitzmann; R. Martin‐Brualla; S. Lombardi; T. Simon; C. Theobalt; M. Nießner; J. T. Barron; G. Wetzstein; M. Zollhöfer; V. Golyanik
errShare
errSave
errShare
errSave
Clad — Automatic Differentiation Using Clang and LLVM
err2015-05-22
err0
errOAAI
errV Vassilev; M Vassilev; A Penev; L Moneta; V Ilieva
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
researcher View more