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

数据并行程序的局部优化

Locality Optimization for Data Parallel Programs

Eric Hielscher, Alex Rubinsteyn, Dennis Shasha

摘要:

NumPy和Matlab等生产力语言使实现数据密集型数值算法变得更加容易。然而,这些语言对于不能很好地映射到其内置原语的程序来说可能慢得令人无法忍受。在本文中,我们将讨论我们的系统Parakeet的局部优化,这是一个面向数组的Python子集的即时编译器和运行时系统。Parakeet动态地将整个用户函数编译为高性能的多线程本机代码。Parakeet广泛使用了经典的数据并行操作符Map、Reduce和Scan。我们引入了一组新的数据并行运算符:TiledMap、TiledReduce和TiledScan,它们将计算分解为有界大小的局部块,以便更好地利用小型快速存储器。我们引入了一种新的平铺变换自动生成平铺运营商。应用此转换一次将程序平铺以用于高速缓存,并且再次应用它将启用寄存器平铺。在运行时执行自动优化搜索之前,缓存切片的大小将保持未指定状态。最后,我们评估我们的优化基准测试,并表现出显着的加速程序,表现出数据的局部性。

英文摘要:

Productivity languages such as NumPy and Matlab make it much easier to implement data-intensive numerical algorithms. However, these languages can be intolerably slow for programs that don't map well to their built-in primitives. In this paper, we discuss locality optimizations for our system Parakeet, a just-in-time compiler and runtime system for an array-oriented subset of Python. Parakeet dynamically compiles whole user functions to high performance multi-threaded native code. Parakeet makes extensive use of the classic data parallel operators Map, Reduce, and Scan. We introduce a new set of data parallel operators,TiledMap, TiledReduce, and TiledScan, that break up their computations into local pieces of bounded size so as better to make use of small fast memories. We introduce a novel tiling transformation to generate tiled operators automatically. Applying this transformation once tiles the program for cache, and applying it again enables tiling for registers. The sizes for cache tiles are left unspecified until runtime, when an autotuning search is performed. Finally, we evaluate our optimizations on benchmarks and show significant speedups on programs that exhibit data locality.

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

↑