arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1706.10086cs.DC
收藏

使用Alpaka库,无需更改任何一行实现代码,即可对各种众核架构进行调优和优化

Tuning and optimization for a variety of many-core architectures without changing a single line of implementation code using the Alpaka library

Alexander Matthes, René Widera, Erik Zenker, Benjamin Worpitz, Axel Huebl, Michael Bussmann

摘要:

我们提出了一个使用Alpaka硬件抽象库优化单个C++11源代码的性能分析。为此,我们使用通用矩阵乘法(GEMM)算法,以表明编译器可以优化Alpaka代码时,调整算法的关键参数有效。我们不打算与现有的高度优化的DGEMM版本竞争,而只是选择这个例子来证明Alpaka允许使用单个源代码进行特定于平台的调优。此外,我们分析了优化潜力与供应商特定的编译器时,面对大量的模板抽象的Alpaka。我们专门测试了Nvidia的Tesla P100、Intel的Knights Landing(KNL)和Haswell架构以及IBM的Power8系统等前沿架构的代码。在其中的一些上,我们能够使用上述手段达到峰值浮点运算性能的几乎50%。当添加特定于编译器的#pragmas时,我们可以在P100上达到5 TFLOPS/s,在KNL系统上超过1 TFLOPS/s。

英文摘要:

We present an analysis on optimizing performance of a single C++11 source code using the Alpaka hardware abstraction library. For this we use the general matrix multiplication (GEMM) algorithm in order to show that compilers can optimize Alpaka code effectively when tuning key parameters of the algorithm. We do not intend to rival existing, highly optimized DGEMM versions, but merely choose this example to prove that Alpaka allows for platform-specific tuning with a single source code. In addition we analyze the optimization potential available with vendor-specific compilers when confronted with the heavily templated abstractions of Alpaka. We specifically test the code for bleeding edge architectures such as Nvidia's Tesla P100, Intel's Knights Landing (KNL) and Haswell architecture as well as IBM's Power8 system. On some of these we are able to reach almost 50\% of the peak floating point operation performance using the aforementioned means. When adding compiler-specific #pragmas we are able to reach 5 TFLOPS/s on a P100 and over 1 TFLOPS/s on a KNL system.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑