arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.20868cs.DCcs.PL
收藏

面向HPC重构的Coccinelle语义补丁研究进展

Advances in Semantic Patching for HPC-oriented Refactorings with Coccinelle

Michele Martone, Julia Lawall

AI总结:

本文总结了利用Coccinelle工具,通过语义补丁实现机器辅助的HPC重构(如GPU支持)的进展,旨在保持代码可理解性和可调试性。

摘要:

目前,对于浮点密集型计算(也称为高性能计算,或HPC)而言,能效最高的硬件平台是图形处理单元(GPU)。然而,将现有的科学代码移植到GPU上绝非易事。本文总结了我们在借助C和C++中现有的API及编程惯用法,实现机器辅助的、面向HPC的重构方面的最新进展。我们正在扩展并用于此目的的工具名为Coccinelle。我们旨在支持的一个重要工作流程是编写和维护简洁的应用程序代码,同时将偶然的、临时的、与性能相关的更改推迟到特定的、独立的规则中,这些规则称为语义补丁。GPU目前提供的调试设施非常有限。我们正在开发的方法旨在保持现有CPU代码的可理解性、长期可维护性以及相关的可调试性,同时通过可脚本化且可能参数化的方式,实现面向HPC的代码演进,例如引入对GPU的支持。本文概述了一些自包含的用例,包括与GPU无关的进一步面向HPC的用例。

英文摘要:

Currently, the most energy-efficient hardware platforms for floating point-intensive calculations (also known as High Performance Computing, or HPC) are graphical processing units (GPUs). However, porting existing scientific codes to GPUs can be far from trivial. This article summarizes our recent advances in enabling machine-assisted, HPC-oriented refactorings with reference to existing APIs and programming idioms available in C and C++. The tool we are extending and using for the purpose is called Coccinelle. An important workflow we aim to support is that of writing and maintaining tersely written application code, while deferring circumstantial, ad-hoc, performance-related changes to specific, separate rules called semantic patches. GPUs currently offer very limited debugging facilities. The approach we are developing aims at preserving intelligibility, longevity, and relatedly, debuggability of existing code on CPUs, while at the same time enabling HPC-oriented code evolutions such as introducing support for GPUs, in a scriptable and possibly parametric manner. This article sketches a number of self-contained use cases, including further HPC-oriented cases which are independent from GPUs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑