Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Program Transpilation Method from Control Flow to Data Flow Based on SDFG

  

  • Online:2025-07-22 Published:2025-07-22

基于SDFG的控制流模型到数据流模型的程序转换方法

Abstract: Dataflow programming is an emerging parallel programming paradigm. By splitting tasks with fine granularity, it achieves high performance parallel computing at the expense of increased programming complexity. This article proposes a new program transpilation method and build procedure, that by leveraging two levels of intermediate representation (IR), is able to convert control-flow computational programs into data-flow architecture in a fully automatic manner. Due to substantial disparities between these programming models, there are many challenges in the automatic conversion scheme, which is split into four concrete categories and tackled separately. Experimental results on the PolyBench/C dataset indicate that the proposed conversion scheme can produce data-flow parallel programs on par with those produced by the SDFG-based OpenMP parallelizing compiler, while surpassing it on about half of the cases. This article also performs case studies on multiple program samples and discusses the cause of performance distinction in different compilation schemes, revealing the superiority of Codelet model with massive number of threads on irregular parallelism.

摘要: 数据流编程是一种新型的并行编程范式,通过细粒度的任务拆分实现高性能的并行计算,但也带来了额外的编程复杂性。本文提出了一种新型的程序转换方法与编译流程,借助两层程序中间表示(IR),实现了将控制流结构的计算程序全自动无缝转换为数据流结构。由于两种编程模型在程序的表达方式上具有诸多差异,自动化转换过程中面临着许多挑战,本文将其细化为四个具体的类别,并逐一提出应对方案。在 PolyBench/C 数据集上的实验结果表明,通过本文设计的转换方案产生的数据流程序,其整体并行计算性能接近基于 SDFG 的 OpenMP 并行化方案,并在近一半的样例中超越 OpenMP 方案。本文还选择了多个具体的程序进行深入分析,讨论了不同编译方案产生的结果存在性能差异的原因,展现了 Codelet 模型在大量线程下面对不规则并行模式的优越性。