SELGPLJul 19, 2023

Code Detection for Hardware Acceleration Using Large Language Models

arXiv:2307.10348v12 citationsh-index: 2
Originality Incremental advance
AI Analysis

This addresses the problem of detecting code kernels for hardware acceleration, offering a novel approach that challenges existing state-of-the-art methods, though it is incremental as it builds on LLMs for a new task.

This work tackled the problem of code detection for hardware acceleration using large language models (LLMs), which was previously unexplored, and achieved excellent overall accuracy of up to 99.7% with a novel prompting strategy, outperforming conventional prompting that had poor accuracy as low as 22.3%.

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, and fast-fourier transform, 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 (68.8%, 22.3%, and 79.2% for GEMM, convolution, and FFT, respectively) due to a high number of false positives. Our novel prompting strategy substantially reduces false positives, resulting in excellent overall accuracy (91.1%, 97.9%, and 99.7%, respectively). These results pose a considerable challenge to existing state-of-the-art code detection methods.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes