首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Automatic compilation of MATLAB programs for synergistic execution on heterogeneous processors
【24h】

Automatic compilation of MATLAB programs for synergistic execution on heterogeneous processors

机译:自动编译MATLAB程序以在异构处理器上协同执行

获取原文
获取原文并翻译 | 示例
           

摘要

MATLAB is an array language, initially popular for rapid prototyping, but is now being increasingly used to develop production code for numerical and scientific applications. Typical MATLAB programs have abundant data parallelism. These programs also have control flow dominated scalar regions that have an impact on the program's execution time. Today's computer systems have tremendous computing power in the form of traditional CPU cores and throughput oriented accelerators such as graphics processing units(GPUs). Thus, an approach that maps the control flow dominated regions to the CPU and the data parallel regions to the GPU can significantly improve program performance. In this paper, we present the design and implementation of MEGHA, a compiler that automatically compiles MATLAB programs to enable synergistic execution on heterogeneous processors. Our solution is fully automated and does not require programmer input for identifying data parallel regions. We propose a set of compiler optimizations tailored for MATLAB. Our compiler identifies data parallel regions of the program and composes them into kernels. The problem of combining statements into kernels is formulated as a constrained graph clustering problem. Heuristics are presented to map identified kernels to either the CPU or GPU so that kernel execution on the CPU and the GPU happens synergistically and the amount of data transfer needed is minimized. In order to ensure required data movement for dependencies across basic blocks, we propose a data flow analysis and edge splitting strategy. Thus our compiler automatically handles composition of kernels, mapping of kernels to CPU and GPU, scheduling and insertion of required data transfer. The proposed compiler was implemented and experimental evaluation using a set of MATLAB benchmarks shows that our approach achieves a geometric mean speedup of 19.8X for data parallel benchmarks over native execution of MATLAB.
机译:MATLAB是一种数组语言,最初在快速原型开发中很流行,但是现在越来越多地用于开发数值和科学应用程序的生产代码。典型的MATLAB程序具有丰富的数据并行性。这些程序还具有控制流为主的标量区域,这会影响程序的执行时间。当今的计算机系统以传统的CPU内核和面向吞吐量的加速器(例如图形处理单元(GPU))的形式具有巨大的计算能力。因此,将控制流控制区域映射到CPU并将数据并行区域映射到GPU的方法可以显着提高程序性能。在本文中,我们介绍了MEGHA的设计和实现,MEGHA是一种自动编译MATLAB程序以在异构处理器上实现协同执行的编译器。我们的解决方案是完全自动化的,不需要程序员输入即可识别数据并行区域。我们提出了一组针对MATLAB的编译器优化。我们的编译器识别程序的数据并行区域,并将它们组合到内核中。将语句组合到内核中的问题被表述为约束图聚类问题。提出启发式算法以将已标识的内核映射到CPU或GPU,从而使CPU和GPU上的内核执行协同发生,并最大程度地减少所需的数据传输量。为了确保跨基本块的依赖项所需的数据移动,我们提出了一种数据流分析和边缘分裂策略。因此,我们的编译器自动处理内核的组成,内核到CPU和GPU的映射,调度和插入所需的数据传输。拟议的编译器已实现,并且使用一组MATLAB基准进行的实验评估表明,相对于MATLAB的本机执行,我们的方法对数据并行基准的几何平均速度提高了19.8倍。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号