半环上的向量化递推
Vectorizing Recurrences over Semirings
AI总结:
本文提出半环上的递推代数与向量化变换,通过编译器生成向量化C++实现,可将递推加速最高达一个数量级,在生物信息学场景下性能优于现有手工向量化库。
摘要:
递推广泛存在于信号与图像处理、生物信息学、数值计算、组合优化等诸多领域。由于递推本质上具有顺序性,常被串行实现,无法利用现代硬件的向量指令,导致大量高度并行的硬件资源未被充分利用。本文提出半环上的递推代数,研究可实现向量化的代数恒等式;基于该代数框架,提出多种向量化变换,可在各类场景下生成高效的向量化实现,这些变换自然扩展至二维递推与互递推。我们在一款编译器中实现了该递推代数与向量化变换,该编译器可将递推程序编译为高效的向量化C++实现;生成的内核在各类递推上相比串行实现可实现最高达一个数量级的加速。生物信息学的案例研究表明,其性能可与现有手工向量化的库媲美,且在多数场景下更优。
英文摘要:
Recurrences are ubiquitous in signal and image processing, bioinformatics, numerical computing, combinatorial optimization, and many other domains. Because recurrences seem inherently sequential, they are often implemented serially and thus do not leverage vector instructions in modern hardware. This leaves much of the available, often highly parallel, hardware underutilized. In this paper, we present an algebra of recurrences over semirings and study algebraic identities that enable vectorization. Using our algebraic framework, we present a number of vectorizing transformations that yield efficient, vectorized implementations across various settings. These transformations naturally extend to 2D recurrences and mutual recurrences. We implement the recurrence algebra and the vectorizing transformations in a compiler called VecRec.VecRec compiles recurrence programs to efficient vectorized C++ implementations. The generated kernels can achieve up to an order-of-magnitude speedup over serial implementations across a wide variety of recurrences. A case study in bioinformatics shows that they are competitive with, and in many cases better than, existing libraries with manually-crafted vectorization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。