Heterogeneous systems, consisting of CPUs and GPUs, offer the capability to address the demands of compute- and data-intensive applications. However, programming such systems is challenging, requiring knowledge of various parallel programming frameworks. This paper introduces COMPAR, a component-based parallel programming framework that enables the exposure and selection of multiple implementation variants of components at runtime. The framework leverages compiler directive-based language extensions to annotate the source code and generate the necessary glue code for the StarPU runtime system. COMPAR provides a unified view of implementation variants and allows for intelligent selection based on runtime context. Our evaluation demonstrates the effectiveness of COMPAR through benchmark applications. The proposed approach simplifies heterogeneous parallel programming and promotes code reuse while achieving optimal performance.
翻译:异构系统(由CPU和GPU组成)能够满足计算密集型与数据密集型应用的需求,但此类系统的编程极具挑战性,需要掌握多种并行编程框架。本文提出COMPAR——一种基于组件的并行编程框架,支持在运行时暴露并选择组件的多种实现变体。该框架利用编译器指令扩展标注源代码,为StarPU运行时系统生成必要胶水代码。COMPAR提供实现变体的统一视图,并允许根据运行上下文进行智能选择。通过基准测试程序验证,COMPAR展现了有效性。所提方法简化了异构并行编程过程,在促进代码复用的同时实现了最优性能。