基于Sacado的新兴多核体系结构c++代码自动识别

IF 2.7 1区 数学 Q2 COMPUTER SCIENCE, SOFTWARE ENGINEERING ACM Transactions on Mathematical Software Pub Date : 2022-12-19 DOI:https://dl.acm.org/doi/10.1145/3560262
Eric Phipps, Roger Pawlowski, Christian Trott
{"title":"基于Sacado的新兴多核体系结构c++代码自动识别","authors":"Eric Phipps, Roger Pawlowski, Christian Trott","doi":"https://dl.acm.org/doi/10.1145/3560262","DOIUrl":null,"url":null,"abstract":"<p>Automatic differentiation (AD) is a well-known technique for evaluating analytic derivatives of calculations implemented on a computer, with numerous software tools available for incorporating AD technology into complex applications. However, a growing challenge for AD is the efficient differentiation of parallel computations implemented on emerging manycore computing architectures such as multicore CPUs, GPUs, and accelerators as these devices become more pervasive. In this work, we explore forward mode, operator overloading-based differentiation of C++ codes on these architectures using the widely available Sacado AD software package. In particular, we leverage Kokkos, a C++ tool providing APIs for implementing parallel computations that is portable to a wide variety of emerging architectures. We describe the challenges that arise when differentiating code for these architectures using Kokkos, and two approaches for overcoming them that ensure optimal memory access patterns as well as expose additional dimensions of fine-grained parallelism in the derivative calculation. We describe the results of several computational experiments that demonstrate the performance of the approach on a few contemporary CPU and GPU architectures. We then conclude with applications of these techniques to the simulation of discretized systems of partial differential equations.</p>","PeriodicalId":50935,"journal":{"name":"ACM Transactions on Mathematical Software","volume":"105 1","pages":""},"PeriodicalIF":2.7000,"publicationDate":"2022-12-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Automatic Differentiation of C++ Codes on Emerging Manycore Architectures with Sacado\",\"authors\":\"Eric Phipps, Roger Pawlowski, Christian Trott\",\"doi\":\"https://dl.acm.org/doi/10.1145/3560262\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p>Automatic differentiation (AD) is a well-known technique for evaluating analytic derivatives of calculations implemented on a computer, with numerous software tools available for incorporating AD technology into complex applications. However, a growing challenge for AD is the efficient differentiation of parallel computations implemented on emerging manycore computing architectures such as multicore CPUs, GPUs, and accelerators as these devices become more pervasive. In this work, we explore forward mode, operator overloading-based differentiation of C++ codes on these architectures using the widely available Sacado AD software package. In particular, we leverage Kokkos, a C++ tool providing APIs for implementing parallel computations that is portable to a wide variety of emerging architectures. We describe the challenges that arise when differentiating code for these architectures using Kokkos, and two approaches for overcoming them that ensure optimal memory access patterns as well as expose additional dimensions of fine-grained parallelism in the derivative calculation. We describe the results of several computational experiments that demonstrate the performance of the approach on a few contemporary CPU and GPU architectures. We then conclude with applications of these techniques to the simulation of discretized systems of partial differential equations.</p>\",\"PeriodicalId\":50935,\"journal\":{\"name\":\"ACM Transactions on Mathematical Software\",\"volume\":\"105 1\",\"pages\":\"\"},\"PeriodicalIF\":2.7000,\"publicationDate\":\"2022-12-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM Transactions on Mathematical Software\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://doi.org/https://dl.acm.org/doi/10.1145/3560262\",\"RegionNum\":1,\"RegionCategory\":\"数学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q2\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Mathematical Software","FirstCategoryId":"94","ListUrlMain":"https://doi.org/https://dl.acm.org/doi/10.1145/3560262","RegionNum":1,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

自动微分(AD)是一种众所周知的技术,用于评估在计算机上实现的计算的解析导数,有许多软件工具可将AD技术整合到复杂的应用程序中。然而,随着多核cpu、gpu和加速器等新出现的多核计算架构的普及,AD面临的一个日益严峻的挑战是如何有效区分并行计算。在这项工作中,我们使用广泛使用的Sacado AD软件包,探索了这些体系结构上基于操作符重载的c++代码的前向模式。特别地,我们利用了Kokkos,这是一个c++工具,提供了用于实现并行计算的api,可移植到各种新兴架构中。我们描述了在使用Kokkos区分这些体系结构的代码时出现的挑战,以及克服这些挑战的两种方法,这些方法确保了最佳的内存访问模式,并在派生计算中暴露了细粒度并行性的额外维度。我们描述了几个计算实验的结果,这些实验证明了该方法在一些当代CPU和GPU架构上的性能。然后,我们总结了这些技术在离散偏微分方程系统模拟中的应用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Automatic Differentiation of C++ Codes on Emerging Manycore Architectures with Sacado

Automatic differentiation (AD) is a well-known technique for evaluating analytic derivatives of calculations implemented on a computer, with numerous software tools available for incorporating AD technology into complex applications. However, a growing challenge for AD is the efficient differentiation of parallel computations implemented on emerging manycore computing architectures such as multicore CPUs, GPUs, and accelerators as these devices become more pervasive. In this work, we explore forward mode, operator overloading-based differentiation of C++ codes on these architectures using the widely available Sacado AD software package. In particular, we leverage Kokkos, a C++ tool providing APIs for implementing parallel computations that is portable to a wide variety of emerging architectures. We describe the challenges that arise when differentiating code for these architectures using Kokkos, and two approaches for overcoming them that ensure optimal memory access patterns as well as expose additional dimensions of fine-grained parallelism in the derivative calculation. We describe the results of several computational experiments that demonstrate the performance of the approach on a few contemporary CPU and GPU architectures. We then conclude with applications of these techniques to the simulation of discretized systems of partial differential equations.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
ACM Transactions on Mathematical Software
ACM Transactions on Mathematical Software 工程技术-计算机:软件工程
CiteScore
5.00
自引率
3.70%
发文量
50
审稿时长
>12 weeks
期刊介绍: As a scientific journal, ACM Transactions on Mathematical Software (TOMS) documents the theoretical underpinnings of numeric, symbolic, algebraic, and geometric computing applications. It focuses on analysis and construction of algorithms and programs, and the interaction of programs and architecture. Algorithms documented in TOMS are available as the Collected Algorithms of the ACM at calgo.acm.org.
期刊最新文献
Algorithm xxx: A Covariate-Dependent Approach to Gaussian Graphical Modeling in R Remark on Algorithm 1012: Computing projections with large data sets PyOED: An Extensible Suite for Data Assimilation and Model-Constrained Optimal Design of Experiments Avoiding breakdown in incomplete factorizations in low precision arithmetic Algorithm xxx: PyGenStability, a multiscale community detection with generalized Markov Stability
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1