arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2111.12478cs.PL
收藏

GPU的预测性数据竞争检测

Predictive Data Race Detection for GPUs

Sagnik Dey, Mayant Mukul, Parth Sharma, Swarnendu Biswas

摘要:

GPU中的高度并行性和相对复杂的同步机制使得编写正确的内核变得困难。数据竞争造成了这样一个并发正确性的挑战,因此,需要检测尽可能多的数据竞争的有效方法。CPU程序的预测偏序关系旨在暴露动态执行过程中可能隐藏的数据竞争。由于编程模型的差异,现有的预测偏序不能简单地应用于分析GPU内核。这项工作提出了GWCP,预测偏序GPU内核的数据竞争检测。GWCP将多线程共享内存CPU程序中提出的一种合理而精确的关系称为弱因果优先关系(WCP)扩展到GPU内核。GWCP考虑了GPU线程层次结构和不同的同步语义,如屏障同步和作用域原子和锁。我们实现了一个名为PreDataR的工具,使用二进制仪表跟踪GWCP关系。PreDataR包括三个优化和一个新的矢量时钟压缩方案,这些方案很容易适用于其他基于偏序的分析。我们的评估与几个微基准测试和基准测试表明,PreDataR有更好的数据竞争覆盖率相比,以前的技术在实际运行时的开销。

英文摘要:

The high degree of parallelism and relatively complicated synchronization mechanisms in GPUs make writing correct kernels difficult. Data races pose one such concurrency correctness challenge, and therefore, effective methods of detecting as many data races as possible are required. Predictive partial order relations for CPU programs aim to expose data races that can be hidden during a dynamic execution. Existing predictive partial orders cannot be naïvely applied to analyze GPU kernels because of the differences in programming models. This work proposes GWCP, a predictive partial order for data race detection of GPU kernels. GWCP extends a sound and precise relation called weak-causally-precedes (WCP) proposed in the context of multithreaded shared memory CPU programs to GPU kernels. GWCP takes into account the GPU thread hierarchy and different synchronization semantics such as barrier synchronization and scoped atomics and locks. We implement a tool called PreDataR that tracks the GWCP relation using binary instrumentation. PreDataR includes three optimizations and a novel vector clock compression scheme that are readily applicable to other partial order based analyses. Our evaluation with several microbenchmarks and benchmarks shows that PreDataR has better data race coverage compared to prior techniques at practical run-time overheads.

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

↑