Automated Transformation of OpenMP to CUDA Kernels Using AI Models

The increasing demand for computational efficiency in high-performance computing (HPC) has driven research into automating the transformation of parallel programming paradigms. This paper investigates an AI-driven approach to translating OpenMP-based CPU parallel programs into CUDA-based GPU programs. Using omniCUDA, a custom fine-tuned large language model (LLM), functional CUDA kernels can be generated directly from OpenMP code, bypassing the need for traditional compiler optimization techniques. The training dataset consists of synthetic OpenMP-to-CUDA pairs and a selected subset of manually optimized algorithms from the PolyBench suite. Performance was evaluated on kernels not included in the training set, with only partial overlap, allowing me to assess the model’s ability to generalize to unseen algorithms. Experimental results confirm that the model produces syntactically correct and compilable CUDA code, successfully replicating functional behavior across parallel loop structures. Performance evaluation on four benchmark algorithms, three of which were not included in the training dataset, shows that the model consistently outperforms OpenMP implementations and, in some cases, surpasses even manually optimized CUDA kernels from the PolyBench suite. The presented approach demonstrates the feasibility and competitiveness of AI-assisted OpenMP-to-CUDA transformation. The model exhibits generalization capabilities beyond the training set, and ongoing work focuses on refining memory access strategies and kernel configurations to further enhance performance across diverse parallel workloads.

Authors

Institutions

Publication Details

Journal
Procedia Computer Science
Published
2025-01-01
DOI
https://doi.org/10.1016/j.procs.2025.09.460
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automated Transformation of OpenMP to CUDA Kernels Using AI Models

Mateusz Grużewski
Procedia Computer Science
Parallel Computing and Optimization Techniques
article

Automated Transformation of OpenMP to CUDA Kernels Using AI Models

Mateusz Grużewski
article en

Abstract

The increasing demand for computational efficiency in high-performance computing (HPC) has driven research into automating the transformation of parallel programming paradigms. This paper investigates an AI-driven approach to translating OpenMP-based CPU parallel programs into CUDA-based GPU programs. Using omniCUDA, a custom fine-tuned large language model (LLM), functional CUDA kernels can be generated directly from OpenMP code, bypassing the need for traditional compiler optimization techniques. The training dataset consists of synthetic OpenMP-to-CUDA pairs and a selected subset of manually optimized algorithms from the PolyBench suite. Performance was evaluated on kernels not included in the training set, with only partial overlap, allowing me to assess the model’s ability to generalize to unseen algorithms. Experimental results confirm that the model produces syntactically correct and compilable CUDA code, successfully replicating functional behavior across parallel loop structures. Performance evaluation on four benchmark algorithms, three of which were not included in the training dataset, shows that the model consistently outperforms OpenMP implementations and, in some cases, surpasses even manually optimized CUDA kernels from the PolyBench suite. The presented approach demonstrates the feasibility and competitiveness of AI-assisted OpenMP-to-CUDA transformation. The model exhibits generalization capabilities beyond the training set, and ongoing work focuses on refining memory access strategies and kernel configurations to further enhance performance across diverse parallel workloads.

Procedia Computer ScienceVol. 270
West Pomeranian University of Technology in Szczecin (PL)
Openalex Percentile: Top 64%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.