arrow
Return

SLANG.D: Fast, Modular and Differentiable Shader Programming

delete2023-12-05
delete6
delete
OA
AI
S
Sai Praveen Bangaru *
L
Lifan Wu
J
Jacob Munkberg
G
Gilbert Bernstein
J
Jonathan Ragan‐Kelley
F
Frédo Durand
A
Aaron Lefohn
贺勇 (Yong He)
DOI:10.1145/3618353delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
We introduce SLANG.D, an extension to the Slang shading language that incorporates first-class automatic differentiation support. The new shading language allows us to transform a Direct3D-based path tracer to be fully differentiable with minor modifications to existing code. SLANG.D enables a shared ecosystem between machine learning frameworks and pre-existing graphics hardware API-based rendering systems, promoting the interchange of components and ideas across these two domains. Our contributions include a differentiable type system designed to ensure type safety and semantic clarity in codebases that blend differentiable and non-differentiable code, language primitives that automatically generate both forward and reverse gradient propagation methods, and a compiler architecture that generates efficient derivative propagation shader code for graphics pipelines. Our compiler supports differentiating code that involves arbitrary control-flow, dynamic dispatch, generics and higher-order differentiation, while providing developers flexible control of checkpointing and gradient aggregation strategies for best performance. Our system allows us to differentiate an existing real-time path tracer, Falcor, with minimal change to its shader code. We show that the compiler-generated derivative kernels perform as efficiently as handwritten ones. In several benchmarks, the SLANG.D code achieves significant speedup when compared to prior automatic differentiation systems.
Keywords:
Automatic differentiation
differentiable graphics
differentiable rendering
shading language

Journal

ACM Transactions on Graphics cover
ACM Transactions on Graphics
IF:
9.5
Papers:
4.7K
Citations:
3.6W

Organization

U
University of Washington
Scholars:
8.0W
Papers: 7.0W
Citations: 12.5W
N
nvidia corporation
Scholars:
767
Papers: 439
Citations: 1
University of California System cover
University of California System
Scholars:
37.5W
Papers: 33.7W
Citations: 6.6K
U
University of California San Diego
Scholars:
4.6W
Papers: 3.5W
Citations: 924
researcher View more organizations