自动并行化:在基于任务的并行机上执行顺序程序
Automatic Parallelization: Executing Sequential Programs on a Task-Based Parallel Runtime
摘要:
在当今的软件中有数十亿行顺序代码,这些代码并没有从现代多核架构中的并行性中受益。自动并行顺序代码,以促进有效地利用现有的并行性,一直是一个研究目标,一段时间了。这项工作为实现这一目标提出了一种新的方法。我们创建了一个新的并行化编译器,它分析程序中的读写指令和控制流修改,以识别程序中指令之间的一组依赖关系。然后,编译器根据生成的依赖关系图重写程序,并将程序组织成面向任务的结构。并行任务由不能并行执行的指令组成。基于工作窃取的并行运行时负责调度和管理生成的任务的粒度。此外,编译时粒度控制机制也避免了创建不必要的数据结构。这项工作的重点是Java语言,但技术是一般性的,足以适用于其他程序设计语言。我们已经评估了我们的方法对OoOJava的8个基准程序,实现更高的加速比。在某些情况下,数值接近手动并行化的数值。由此产生的并行代码还具有可读和易于手动配置以进一步提高其性能的优点。
英文摘要:
There are billions of lines of sequential code inside nowadays' software which do not benefit from the parallelism available in modern multicore architectures. Automatically parallelizing sequential code, to promote an efficient use of the available parallelism, has been a research goal for some time now. This work proposes a new approach for achieving such goal. We created a new parallelizing compiler that analyses the read and write instructions, and control-flow modifications in programs to identify a set of dependencies between the instructions in the program. Afterwards, the compiler, based on the generated dependencies graph, rewrites and organizes the program in a task-oriented structure. Parallel tasks are composed by instructions that cannot be executed in parallel. A work-stealing-based parallel runtime is responsible for scheduling and managing the granularity of the generated tasks. Furthermore, a compile-time granularity control mechanism also avoids creating unnecessary data-structures. This work focuses on the Java language, but the techniques are general enough to be applied to other programming languages. We have evaluated our approach on 8 benchmark programs against OoOJava, achieving higher speedups. In some cases, values were close to those of a manual parallelization. The resulting parallel code also has the advantage of being readable and easily configured to improve further its performance manually.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。