用现代C++缩小性能差距
Closing the Performance Gap with Modern C++
摘要:
在通往Exascale的道路上,程序员面临着越来越大的挑战,即必须从同一代码库支持多种硬件架构。与此同时,随着硬件架构变得越来越多样化,代码的可移植性和性能越来越难以实现。当今的异构系统通常包括两个或更多个完全不同且不兼容的硬件执行模型,诸如GPGPU、SIMD向量单元和通用核,其常规上必须使用表示非重叠编程模型的单独工具链来编程。最近工业界和更广泛的社区对C++语言的兴趣复苏,在并发和并行领域激发了大量的标准化建议和技术规范。这包括最近越来越多的讨论,围绕需要一个统一的,更高层次的抽象和编程模型的并行性在C++标准的目标异构和分布式计算。这种抽象应该与现有的、已经标准化的语言和库功能完美融合,但也应该足够通用,以支持未来的硬件开发。在本文中,我们提出了这样一个更高层次的编程抽象的并行性在C++,其目的是使代码和性能的可移植性在广泛的体系结构和各种类型的并行性的结果。我们提出并比较从运行著名的STREAM基准移植到我们的更高级别的C++抽象与相应的结果从运行它本机获得的性能数据。我们表明,我们的抽象,使性能至少一样好的可比基线基准,同时提供一个统一的编程API的所有比较的目标体系结构。
英文摘要:
On the way to Exascale, programmers face the increasing challenge of having to support multiple hardware architectures from the same code base. At the same time, portability of code and performance are increasingly difficult to achieve as hardware architectures are becoming more and more diverse. Today's heterogeneous systems often include two or more completely distinct and incompatible hardware execution models, such as GPGPU's, SIMD vector units, and general purpose cores which conventionally have to be programmed using separate tool chains representing non-overlapping programming models. The recent revival of interest in the industry and the wider community for the C++ language has spurred a remarkable amount of standardization proposals and technical specifications in the arena of concurrency and parallelism. This recently includes an increasing amount of discussion around the need for a uniform, higher-level abstraction and programming model for parallelism in the C++ standard targeting heterogeneous and distributed computing. Such an abstraction should perfectly blend with existing, already standardized language and library features, but should also be generic enough to support future hardware developments. In this paper, we present the results from developing such a higher-level programming abstraction for parallelism in C++ which aims at enabling code and performance portability over a wide range of architectures and for various types of parallelism. We present and compare performance data obtained from running the well-known STREAM benchmark ported to our higher level C++ abstraction with the corresponding results from running it natively. We show that our abstractions enable performance at least as good as the comparable base-line benchmarks while providing a uniform programming API on all compared target architectures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。