HackerPapers

arXiv:1810.08297cs.MS

Dynamic Automatic Differentiation of GPU Broadcast Kernels

Jarrett Revels, Tim Besard, Valentin Churavy, Bjorn De Sutter, Juan Pablo Vielma

Abstract

We show how forward-mode automatic differentiation (AD) can be employed within larger reverse-mode computations to dynamically differentiate broadcast operations in a GPU-friendly manner. Our technique fully exploits the broadcast Jacobian's inherent sparsity structure, and unlike a pure reverse-mode approach, this "mixed-mode" approach does not require a backwards pass over the broadcasted operation's subgraph, obviating the need for several reverse-mode-specific programmability restrictions on user-authored broadcast operations. Most notably, this approach allows broadcast fusion in primal code despite the presence of data-dependent control flow. We discuss an experiment in which a Julia implementation of our technique outperformed pure reverse-mode TensorFlow and Julia implementations for differentiating through broadcast operations within an HM-LSTM cell update calculation.

arXiv comments
Journal reference
DOI
Subjects
cs.MSMathematical Software

On Hacker News

Linked by 2 identifiable commenters in 3 comments across 3 threads, from Nov 2018 to Jun 2024. Found in 1 HN submission from Oct 2018 to Oct 2018. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • Cool stuff! Thanks for the write-up. Getting broadcast ergonomics right in a fully statically typed context seems both tricky and pretty satisfying. > We thought it’d be a fun/simple feature and a good break from the heavy duty work on automatic differentiation we had just…

      jrevelsView on HNParent context

    • No worries! I didn't mean it as a correction so much as just a discussion; I'm sure it's true that other autodiff systems have very sophisticated automatic remat (like https://openreview.net/forum?id=BkYYXJ9i-). I'm hoping as users push JAX on new applications, especially in…

      mattjjatgoogleView on HNParent context

    • Author here; the arxiv version can be found at https://arxiv.org/abs/1810.08297. Not much different from OP's linked version, but it includes citations to other interesting Julia AD/TPU-related papers that utilize this technique. Happy to answer any questions, at least until I…

      jrevelsView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.