Reverse -Mode Automatic Differentiation and Optimization of CPU Kernels via Enzyme

SC21: INTERNATIONAL CONFERENCE FOR HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS(2021)

引用 0|浏览3
暂无评分
摘要
Computing derivatives is key to many algoritluns in scientific computing and machine learning such as optimization, uncertainty quantification, and stability analysis. Enzyme is a LLVM compiler plugin that performs reverse -mode automatic differentiation (AD) and thus generates high performance gradients of programs in languages including C/C++, Fortran, Julia, and Rust. Prior to this work, Enzyme and other AD tools were not capable of generating gradients of GPU kernels. Our paper presents a combination of novel techniques that make Enzyme the first fully automatic reverse mode Al) tool to generate gradients of CPU kernels. Since unlike other tools Enzyme performs automatic differentiation within a general-purpose compiler, we are able to introduce several novel GPU and AD-specific optimizations. To show the generality and efficiency of our approach, we compute gradients of five GPU-based HPC applications, executed on NVIDIA and AIVID CPUs. All benchmarks run within an order of magnitude of the original program's execution time. Without CPU and AD -specific optimizations, gradients of CPU kernels either fail to run from a laCk of resources or have infeasible overhead. Finally, we demonstrate that increasing the problem size by either increasing the number of threads or increasing the work per thread, does not substantially impact the overhead from differentiation.
更多
查看译文
关键词
Automatic Differentiation, AD, CUDA, ROCm, GPU, LLVM, HPC
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要