Developing efficient parallel programs is very tough even for experts. Advanced AI technology, such as large language models (LLMs), is expected to help with this. In this context, a state-of-the-art study has evaluated the ability to write parallel codes for various LLMs. However, the previous study does not provide a detailed analysis of the codes generated by LLM. Moreover, due to the rapid advancement of LLMs, the LLMs used in the previous study are becoming stale. In this paper, we provide the first detailed analysis of the MPI parallel codes generated by GPT-4o, the latest accessible LLM when we started this study. More specifically, we collect 1,200 MPI codes by executing the ParEval benchmark suite on GPT-4o and then classify the generated codes into four categories (pass, and logical, runtime, and compile errors) based on the types of errors. We further analyze the codes in each category to identify the sources of errors. Our analysis observed many cases where generated codes were parallelized incorrectly but passed given unit tests. This suggests that a new metric is needed to assess the correctness of parallel codes generated by LLMs.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Analysis of MPI Parallel Code Generated by GPT-4o

  • Rin Tanaka,
  • Hayato Yamaki,
  • Shinobu Miwa,
  • Hiroki Honda

摘要

Developing efficient parallel programs is very tough even for experts. Advanced AI technology, such as large language models (LLMs), is expected to help with this. In this context, a state-of-the-art study has evaluated the ability to write parallel codes for various LLMs. However, the previous study does not provide a detailed analysis of the codes generated by LLM. Moreover, due to the rapid advancement of LLMs, the LLMs used in the previous study are becoming stale. In this paper, we provide the first detailed analysis of the MPI parallel codes generated by GPT-4o, the latest accessible LLM when we started this study. More specifically, we collect 1,200 MPI codes by executing the ParEval benchmark suite on GPT-4o and then classify the generated codes into four categories (pass, and logical, runtime, and compile errors) based on the types of errors. We further analyze the codes in each category to identify the sources of errors. Our analysis observed many cases where generated codes were parallelized incorrectly but passed given unit tests. This suggests that a new metric is needed to assess the correctness of parallel codes generated by LLMs.