LLM-Vectorizer: LLM-based Verified Loop Vectorizer
Jubi Taneja, Avery Laird, Cong Yan, Madan Musuvathi, Shuvendu K., Lahiri

TL;DR
This paper explores using large-language models to automatically generate and verify vectorized code from scalar programs, achieving significant speedups and improving compiler vectorization success rates.
Contribution
It introduces a novel LLM-based approach with test feedback for generating vectorized code and applies verification techniques to ensure correctness.
Findings
Achieves 1.1x to 9.4x speedup over traditional compilers.
Verifies 38.2% of vectorizations as correct on benchmark datasets.
Demonstrates the potential of LLMs in automated code optimization.
Abstract
Vectorization is a powerful optimization technique that significantly boosts the performance of high performance computing applications operating on large data arrays. Despite decades of research on auto-vectorization, compilers frequently miss opportunities to vectorize code. On the other hand, writing vectorized code manually using compiler intrinsics is still a complex, error-prone task that demands deep knowledge of specific architecture and compilers. In this paper, we evaluate the potential of large-language models (LLMs) to generate vectorized (Single Instruction Multiple Data) code from scalar programs that process individual array elements. We propose a novel finite-state machine multi-agents based approach that harnesses LLMs and test-based feedback to generate vectorized code. Our findings indicate that LLMs are capable of producing high performance vectorized code with…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsReal-time simulation and control systems
