Exploiting vector instructions with generalized stream fusion

Exploiting vector instructions with generalized stream fusion
复制标题

通过广义流融合利用向量指令

DOI:
10.1145/3060597
复制
发表时间:
2017
影响因子:
22.7
通讯作者:
S. Jones
S. Jones
中科院分区:
计算机科学3区
文献类型:
--
作者:
G. Mainland;Roman Leshchinskiy;S. Jones

文献摘要

被引文献

相似文献

理想情况下,将作为简洁,独立组件组成的程序编写的程序应与等效的手写版本一样,其中许多组件的功能已手动合并为单片实现。也就是说,程序员不必牺牲代码清晰度或良好的软件工程实践来获得性能 - 我们希望没有绩效惩罚的组成性。这项工作表明了如何在序列处理函数的领域中实现高级Haskell的目标,其中包括诸如数组处理之类的应用程序。先前的流融合工作显示了如何自动将一些高级序列处理函数转换为有效的实现。它已被用来在Haskell库中进行巨大效果,以操纵字节阵列,Unicode文本和未盒子的向量。但是,某些操作(例如向量附加)在流融合框架内表现不佳。其他的,例如使用现代X86芯片上可用的SSE和AVX说明的SIMD计算,似乎根本不适合流融合框架。我们描述了广义流融合,该流通过仔细选择流表示解决了这些问题。基准测试表明,使用我们的编译器和库编写的高级Haskell代码可以生成比编译器和手工矢量的代码。C。
Ideally, a program written as a composition of concise, self-contained components should perform as well as the equivalent hand-written version where the functionality of what was many components has been manually combined into a monolithic implementation. That is, programmers should not have to sacrifice code clarity or good software engineering practices to obtain performance---we want compositionality without a performance penalty. This work shows how to attain this goal for high-level Haskell in the domain of sequence-processing functions, which includes applications such as array processing. Prior work on stream fusion shows how to automatically transform some high-level sequence-processing functions into efficient implementations. It has been used to great effect in Haskell libraries for manipulating byte arrays, Unicode text, and unboxed vectors. However some operations, like vector append, do not perform well within the stream fusion framework. Others, like SIMD computation using the SSE and AVX instructions available on modern x86 chips, do not seem to fit in the stream fusion framework at all. We describe generalized stream fusion, which solves these issues through a careful choice of stream representation. Benchmarks show that high-level Haskell code written using our compiler and libraries can produce code that is faster than both compiler- and hand-vectorized C.