Large language models (LLMs) are demonstrating significant promise as an alternate strategy to facilitate analyses and optimizations of high-performance computing programs, circumventing the need for resource-intensive manual tool creation. In this paper, we explore a novel LLM-based data race detection approach combining prompting engineering and fine-tuning techniques. We create a dedicated dataset named DRB-ML, which is derived from DataRaceBench, with fine-grain labels showing the presence of data race pairs and their associated variables, line numbers, and read/write information. DRB-ML is then used to evaluate representative LLMs and fine-tune open-source ones. Our experiment shows that LLMs can be a viable approach to data race detection. However, they still cannot compete with traditional data race detection tools when we need detailed information about variable pairs causing data races.
翻译:大语言模型(LLMs)正在展示其作为促进高性能计算程序分析与优化的替代策略的巨大潜力,可避免资源密集型手动工具创建的需求。本文探索了一种结合提示工程与微调技术的新型基于大语言模型的数据竞争检测方法。我们创建了名为DRB-ML的专用数据集,该数据集源自DataRaceBench,包含细粒度标注,显示数据竞争对的存在及其相关变量、行号与读/写信息。随后利用DRB-ML评估代表性大语言模型并微调开源模型。实验表明,大语言模型可作为数据竞争检测的可行方法。然而,当需要获取引发数据竞争的变量对详细信息时,它们仍无法与传统的数竞争检测工具相媲美。