通过支持 OpenMP 循环指令在 Zig 中实现编译指示驱动的共享内存并行
Pragma driven shared memory parallelism in Zig by supporting OpenMP loop directives
AI总结:
本文通过为 Zig 编译器添加 OpenMP 循环指令支持,弥补其在 HPC 领域缺少共享内存并行的不足,并利用 NAS 并行基准测试验证其扩展性与 Fortran/C 相当且性能最高提升 1.25 倍。
摘要:
Zig 编程语言旨在将性能与安全作为首要关注点,近年来已变得流行。鉴于 Zig 构建于 LLVM 之上,因此享有该生态系统提供的许多好处,包括访问丰富的后端集合,Zig 在高性能工作负载方面具有巨大潜力。然而,它尚未在高性能计算(HPC)领域获得认可,原因之一是缺少对编译指示驱动的共享内存并行的支持。在本文中,我们描述了增强 Zig 编译器以添加对 OpenMP 循环指令的支持。然后使用 NASA 的 NAS 并行基准测试(NPB)套件探索性能。我们证明,我们集成的 OpenMP 与 Zig 不仅扩展性与 NPB 的 Fortran 和 C 参考实现相当,而且与 Fortran 相比,Zig 提供了高达 1.25 倍的性能提升。
英文摘要:
The Zig programming language, which is designed to provide performance and safety as first class concerns, has become popular in recent years. Given that Zig is built upon LLVM, and-so enjoys many of the benefits provided by the ecosystem, including access to a rich set of backends, Zig has significant potential for high performance workloads. However, it is yet to gain acceptance in HPC and one of the reasons for this is that support for the pragma driven shared memory parallelism is missing. In this paper we describe enhancing the Zig compiler to add support for OpenMP loop directives. Then exploring performance using NASA's NAS Parallel Benchmark (NPB) suite. We demonstrate that not only does our integration of OpenMP with Zig scale comparatively to Fortran and C reference implementations of NPB, but furthermore Zig provides up to a 1.25 times performance increase compared to Fortran.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。