arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

面向可移植性能的Python HPC内核的交互式调试器

Interactive Debugger for Performance Portable Python HPC Kernels

Ivan Grigorik, Gabriel Kosmacher, George Biros, Milos Gligoric

arXiv 2609.07912首次发表:更新:

发表机构

The University of Texas at Austin(德克萨斯大学奥斯汀分校)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

PKDB是首个面向Python HPC内核的交互式调试器,支持断点、实时代码评估与内核调用点替换,在多种CPU和GPU上开销低,填补了该领域调试空白。

AI 中文摘要

我们提出了PKDB,这是首个针对用Python编写的GPU和多线程底层内核的交互式调试器。Python在高性能计算(HPC)中被广泛使用,诸如PyKokkos等框架将Python嵌入式领域特定语言翻译为可在OpenMP线程化CPU和各种GPU上运行的原生代码。然而,此类代码缺乏交互式调试支持:开发者只能求助于打印语句、框架特定的断言或仅CPU执行,而最后一种方法需要修改程序或其数据,并且可能掩盖设备特定的错误。PKDB在保持实际设备上执行且无需修改源代码的情况下,实现了标准交互式调试功能,如断点、单步执行和变量检查。在这些基础功能之上,PKDB引入了两项利用Python和PyKokkos动态特性的高级能力:(i)实时代码评估,允许开发者在暂停的内核中间执行任意Python表达式或整个内核,而无需重启进程;(ii)内核调用点替换,允许正在运行的内核被即时更新和重新加载,从而只需重新编译和重新执行该内核,而无需重启应用程序。我们在Intel、AMD和NVIDIA CPU以及NVIDIA和AMD GPU上的性能评估表明,PKDB引入了有限的额外开销,适合日常使用,同时为Python HPC生态系统带来了关键的调试功能。

英文摘要

We propose PKDB, the first interactive debugger for GPU and multithreaded low-level kernels written in Python. Python is widely used in high performance computing (HPC), with frameworks such as PyKokkos translating Python-embedded domain-specific languages to native code that runs across OpenMP-threaded CPUs and various GPUs. Yet interactive debugging support for such code is absent: developers resort to print statements, framework-specific assertions, or CPU-only execution, the last of which requires altering the program or its data and can mask device-specific bugs. PKDB enables standard interactive debugging like breakpoints, stepping, and variable inspection while preserving actual on-device execution without source modification. Beyond these fundamentals, PKDB introduces two advanced capabilities that exploit the dynamic nature of Python and PyKokkos: (i) Live code evaluation, which lets developers execute arbitrary Python expressions or entire kernels in the middle of a paused kernel without restarting the process; (ii) Kernel call site substitution, which allows an actively running kernel to be updated and reloaded on the fly, so only the kernel is recompiled and re-executed without restarting the application. Our performance evaluation on Intel, AMD, and NVIDIA CPUs, and NVIDIA and AMD GPUs shows that PKDB introduces limited overhead and is practical for everyday use while introducing critical debugging features to the Python HPC ecosystem.

CommentsAccepted at SC 2026

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑