Repository logo
Log in(current)
Repository logoMIT Open ScholarshipDSpace@MIT
  1. Home
  2. MIT Open Access Articles
  3. MIT Open Access Articles
  4. SLANG.D: Fast, Modular and Differentiable Shader Programming

SLANG.D: Fast, Modular and Differentiable Shader Programming

Thumbnail Image
Download
Name

3618353.pdf

Size

12.41 MB

Format

Adobe PDF

Checksum (MD5)

4c912ac45cd0e3e8864d0e4498e2e3a6

Download all files submitted through automated deposit
3618353.zip (12.08 MB)
Author(s)
Bangaru, Sai Praveen
•
Wu, Lifan
•
Li, Tzu-Mao
•
Munkberg, Jacob
•
Bernstein, Gilbert
•
Ragan-Kelley, Jonathan
•
Durand, Fredo
•
Lefohn, Aaron
•
He, Yong
Date Issued
December 4, 2023
Journal
ACM Transactions on Graphics
Publisher
ACM
Citation
Bangaru, Sai Praveen, Wu, Lifan, Li, Tzu-Mao, Munkberg, Jacob, Bernstein, Gilbert et al. 2023. "SLANG.D: Fast, Modular and Differentiable Shader Programming." ACM Transactions on Graphics, 42 (6).
Version
Final published version
Abstract
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 changes 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.
MIT Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
Terms of Use
Creative Commons Attribution
https://creativecommons.org/licenses/by/4.0/
Persistent DSpace Link
https://hdl.handle.net/1721.1/153273
DOI of Published Version
https://doi.org/10.1145/3618353
Repository logo
PrivacyPermissionsAccessibilityContact us
Repository logo
Notify us about copyright concerns.