arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.04701cs.DC
收藏

HiRace:准确且快速的GPU程序源码级竞态检查

HiRace: Accurate and Fast Source-Level Race Checking of GPU Programs

John Jacobson, Martin Burtscher, Ganesh Gopalakrishnan

AI总结:

提出HiRace,一种GPU程序源码级动态数据竞争检测工具,通过并行有限状态机压缩访问历史,在580个CUDA内核上实现零误报检测,平均速度提升10倍且内存开销减半。

摘要:

数据竞争是CPU上极其恶劣的并行编程错误。由于层次化的线程和内存结构,它们在GPU上更为严重,这种结构使得编写在线程组内正确同步但跨组不正确的代码成为可能。到目前为止,所有主要的GPU数据竞争检查器都至少存在以下问题之一:不检查全局内存中的竞争、不适用于最新的GPU、扩展性差、未经广泛测试、遗漏简单的数据竞争,或者在没有编译器详细知识的情况下不可靠。\n我们的新数据竞争检测工具HiRace克服了这些限制。其关键创新是一种创新的并行有限状态机,它将任意长的访问历史压缩为定长状态,从而允许它处理大型且长时间运行的程序。HiRace是一个动态工具,检查线程组共享内存和全局设备内存竞争。它利用源代码插桩,从而避免驱动程序、编译器和硬件依赖。我们在一个现代校准的数据竞争基准套件上评估它。在580个测试的CUDA内核中,346个包含数据竞争,HiRace发现了其他工具遗漏的竞争且无误报,平均速度比当前最先进技术快10倍以上,同时仅产生一半的内存开销。

英文摘要:

Data races are egregious parallel programming bugs on CPUs. They are even worse on GPUs due to the hierarchical thread and memory structure, which makes it possible to write code that is correctly synchronized within a thread group while not being correct across groups. Thus far, all major data-race checkers for GPUs suffer from at least one of the following problems: they do not check races in global memory, do not work on recent GPUs, scale poorly, have not been extensively tested, miss simple data races, or are not dependable without detailed knowledge of the compiler. Our new data-race detection tool, HiRace, overcomes these limitations. Its key novelty is an innovative parallel finite-state machine that condenses an arbitrarily long access history into a constant-length state, thus allowing it to handle large and long-running programs. HiRace is a dynamic tool that checks for thread-group shared memory and global device memory races. It utilizes source-code instrumentation, thus avoiding driver, compiler, and hardware dependencies. We evaluate it on a modern calibrated data-race benchmark suite. On the 580 tested CUDA kernels, 346 of which contain data races, HiRace finds races missed by other tools without false alarms and is more than 10 times faster on average than the current state of the art, while incurring only half the memory overhead.

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

↑