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.
翻译:大语言模型作为促进高性能计算程序分析与优化的新兴策略展现出巨大潜力,可规避资源密集型人工工具开发的需求。本文探索了一种结合提示工程与微调技术的创新性大语言模型数据竞争检测方法。我们构建了名为DRB-ML的专用数据集,该数据集源自DataRaceBench,包含细粒度标注信息,可标识数据竞争对及其关联变量、行号与读写操作属性。利用DRB-ML对代表性大语言模型进行评估,并对开源模型进行微调。实验表明,大语言模型可作为数据竞争检测的可行方案,但针对导致数据竞争的变量对详细信息需求场景,其性能仍无法超越传统数据竞争检测工具。