arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1704.04374cs.MScs.DCcs.PF
收藏

HPTT:一个高性能张量转置C++库

HPTT: A High-Performance Tensor Transposition C++ Library

Paul Springer, Tong Su, Paolo Bientinesi

摘要:

最近,我们提出了TTC,一个特定于域的张量转置编译器。尽管生成的代码的性能几乎是最佳的,但由于其离线性质,TTC不能用于所有在运行时确定张量大小和必要的张量排列的应用程序代码中。为了克服这一限制,我们引入了开源C++库高性能张量转置(HPTT)。与TTC类似,HPTT结合了诸如阻塞、多线程和显式向量化等优化;此外,它将任何转置分解为围绕所谓的微内核的多个循环。这种模块化设计-受BLIS启发-使得HPTT易于移植到不同的架构,只需替换手动矢量化的微内核(例如,4 × 4转置)。HPTT还提供了一个可选的自动调优框架-由性能模型指导-在运行时探索实现的巨大搜索空间(类似于FFTW)。在各种不同的张量转置和架构(例如,Intel Ivy Bridge、Intel Knights Landing、ARMv7、IBM Power 7),HPTT获得了与SAXPY相当的带宽,并在Eigen的张量转置实现上产生了显著的加速。最重要的是,将HPTT集成到Cyclops Tensor Framework(CTF)中,将张量收缩的整体性能提高了3.1倍。

英文摘要:

Recently we presented TTC, a domain-specific compiler for tensor transpositions. Despite the fact that the performance of the generated code is nearly optimal, due to its offline nature, TTC cannot be utilized in all the application codes in which the tensor sizes and the necessary tensor permutations are determined at runtime. To overcome this limitation, we introduce the open-source C++ library High-Performance Tensor Transposition (HPTT). Similar to TTC, HPTT incorporates optimizations such as blocking, multi-threading, and explicit vectorization; furthermore it decomposes any transposition into multiple loops around a so called micro-kernel. This modular design---inspired by BLIS---makes HPTT easy to port to different architectures, by only replacing the hand-vectorized micro-kernel (e.g., a 4x4 transpose). HPTT also offers an optional autotuning framework---guided by a performance model---that explores a vast search space of implementations at runtime (similar to FFTW). Across a wide range of different tensor transpositions and architectures (e.g., Intel Ivy Bridge, Intel Knights Landing, ARMv7, IBM Power7), HPTT attains a bandwidth comparable to that of SAXPY, and yields remarkable speedups over Eigen's tensor transposition implementation. Most importantly, the integration of HPTT into the Cyclops Tensor Framework (CTF) improves the overall performance of tensor contractions by up to 3.1x.

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

↑