Efficient parallelization of algorithms on general-purpose GPUs is essential in many areas today. However, it is a non-trivial task for software engineers to utilize GPUs to improve the performance of high-level programs in general. Although many domain-specific approaches are available for GPU acceleration, it is difficult to accelerate existing high-level programs without rewriting parts of the programs using low-level GPU code. We present a compiler implementation using an alternative approach called expression acceleration. This approach marks expressions for acceleration, and the compiler automatically infers which dependent code needs to be accelerated. We design and implement a compiler supporting expression acceleration for a statically typed functional language and evaluate its applicability and performance.
翻译:当前,在通用GPU上高效并行化算法在许多领域至关重要。然而,软件工程师利用GPU提升高级程序性能通常并非易事。尽管存在诸多面向特定领域的GPU加速方法,但若不完全使用底层GPU代码重写部分程序,则难以加速现有的高级程序。本文提出一种采用替代方法——表达式加速的编译器实现。该方法通过标记表达式以实现加速,编译器自动推断哪些依赖代码需要被加速。我们设计并实现了一个支持表达式加速的静态类型函数式语言编译器,并评估了其适用性与性能。