arrow
Return

Code Detection for Hardware Acceleration Using Large Language Models

delete2024-01-01
delete1
delete
OA
AI
P
Pablo A. Lanzarote Martínez
G
Gregorio Bernabé *
J
José M. Garcı́a
DOI:10.1109/ACCESS.2024.3372853delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Large language models (LLMs) have been massively applied to many tasks, often surpassing state-of-the-art approaches. While their effectiveness in code generation has been extensively studied (e.g., AlphaCode), their potential for code detection remains unexplored. This work presents the first analysis of code detection using LLMs. Our study examines essential kernels, including matrix multiplication, convolution, fast-fourier transform and LU factorization, implemented in C/C++. We propose both a preliminary, naive prompt and a novel prompting strategy for code detection. Results reveal that conventional prompting achieves great precision but poor accuracy (67.5%, 22.5%, 79.5% and 64% for GEMM, convolution, FFT and LU factorization, respectively) due to a high number of false positives. Our novel prompting strategy substantially reduces false positives, resulting in excellent overall accuracy (91.2%, 98%, 99.7% and 99.7%, respectively). These results pose a considerable challenge to existing state-of-the-art code detection methods.
Keywords:
Codes
Task analysis
Computational modeling
Convolution
Kernel
Hardware acceleration
Transforms
Detection algorithms
Program processors
Large language models
Code detection
compilers
heterogeneous computing
high-performance computing
large language model

Journal

IEEE Access cover
IEEE Access
IF:
3.6
Papers:
9.8W
Citations:
29.4W

Organization

H
huawei technologies
Scholars:
3.3K
Papers: 2.9K
Citations: 1
U
University of Murcia
Scholars:
9.2K
Papers: 8.1K
Citations: 8