GT4Py:使用Python实现天气与气候应用的高性能模板计算
GT4Py: High Performance Stencils for Weather and Climate Applications using Python
AI总结:
GT4Py是一个Python框架,通过嵌入式DSL和自动代码生成,实现天气与气候模板计算的高性能,分离数学定义与实现,支持多架构可移植性,性能远超纯Python。
摘要:
目前,所有主要的天气和气候应用均使用Fortran或C++等语言开发。这在高性能计算(HPC)领域是典型的做法,因为高效执行是一个重要的关注点。不幸的是,这种方法导致实现将针对特定硬件架构的优化与领域内典型的高级数值方法混在一起。这导致代码冗长、难以扩展和维护,并且难以移植到不同的硬件架构。在此,我们提出了一种基于GT4Py(GridTools for Python)的不同策略。GT4Py是一个用于编写天气和气候应用的Python框架,包含一个用于编写模板计算的高级嵌入式领域特定语言(DSL)。GT4Py中集成的工具链支持自动代码生成,以获得与最先进的C++和CUDA实现相当的性能。数学定义与实际实现之间的关注点分离,使得计算能够在广泛的计算架构上实现性能可移植性,同时嵌入Python使得科学家能够轻松访问Python生态系统的工具,以提高生产力并促进复杂工作流的集成。本文描述了GT4Py的初始版本,概述了框架的当前状态,并展示了GT4Py能够比纯Python实现快数个数量级的性能结果。
英文摘要:
All major weather and climate applications are currently developed using languages such as Fortran or C++. This is typical in the domain of high performance computing (HPC), where efficient execution is an important concern. Unfortunately, this approach leads to implementations that intermix optimizations for specific hardware architectures with the high-level numerical methods that are typical for the domain. This leads to code that is verbose, difficult to extend and maintain, and difficult to port to different hardware architectures. Here, we propose a different strategy based on GT4Py (GridTools for Python). GT4Py is a Python framework to write weather and climate applications that includes a high-level embedded domain specific language (DSL) to write stencil computations. The toolchain integrated in GT4Py enables automatic code-generation,to obtain the performance of state-of-the-art C++ and CUDA implementations. The separation of concerns between the mathematical definitions and the actual implementations allows for performance portability of the computations on a wide range of computing architectures, while being embedded in Python allows easy access to the tools of the Python ecosystem to enhance the productivity of the scientists and facilitate integration in complex workflows. Here, the initial release of GT4Py is described, providing an overview of the current state of the framework and performance results showing how GT4Py can outperform pure Python implementations by orders of magnitude.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。