# STParOpt: An End-to-End Framework for Execution-Aware Parallelism Inference and Optimized CUDA Migration

*Meng Wang, Jinshuo Liu, Weiran Pian, Feiyang Wen, Xinya Liu, Juan Deng, Jeff Pan*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149431) · [OpenReview](https://openreview.net/forum?id=q6zVPYeseN) · [Open on the map](../papers.html#p149431)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [GPU Kernel Optimization and Benchmarking](../pgroup/467.md) · Type: new method · Keywords: parallelism inference, CUDA code generation, execution-aware, static analysis, cross-attention, entropy-guided fusion

## Summary
STParOpt is an end-to-end framework that leverages execution signals and cross-attention to infer parallelism and optimize CUDA migration for serial C programs, achieving 96.4% parallelism detection accuracy and 86.1% end-to-end generation correctness.

## Explained to a 5-year-old
We have a program that runs one step at a time, which can be slow. To make it faster, we want to split the work so many parts can happen together. However, it is hard to know which parts can run together just by looking at the written code. Existing methods that look only at the code often miss tricky parts, and methods that read the code as text also miss important details. The paper looks at how the program actually runs while it works to get more information.

## Explained to a 5-year-old, longer
Some computer programs are written to do many calculations, but they only do one thing at a time, which can be slow. To make them faster, we want to split the work so many parts can happen together. However, it is hard to know which parts can run together just by looking at the written code. Existing methods that look only at the code often miss tricky parts, and methods that read the code as text also miss important details. The paper looks at how the program actually runs while it works to get more information. It builds a picture of the program’s steps and adds extra details about how fast each step moves through memory. Then it uses a special way to combine what it learned from running the program with what it guessed from the code. This combination gives more reliable hints about which parts can be parallelized. The result is a system that can automatically create new parallel code for powerful graphics cards. This new code runs much faster than the old methods, helping scientists and engineers solve big problems quicker. The approach works on many different kinds of programs used in high-performance computing. Overall, it makes the process of turning slow, single-threaded programs into fast, parallel ones easier and more accurate.

## For a technical reader
STParOpt takes static program dependence graphs and enriches them with stride-level execution features captured via cross-attention. It then fuses static predictions with dynamic execution evidence using an entropy-guided weighting scheme to resolve uncertainty. This yields high-accuracy parallelism detection (96.4%) and correct CUDA code generation (86.1%). The framework is evaluated on standard HPC benchmarks and outperforms compiler-based and LLM-based baselines by significant margins. It can be integrated into existing build pipelines to automatically generate optimized parallel kernels for serial C code.

## Problem
Migrating serial C programs to parallel execution is difficult because static analysis often fails on irregular loops and LLM-based approaches cannot capture memory-access-dependent optimizations from source code alone.

## Method
The approach formulates parallelism inference as an uncertainty-aware learning problem, augments static program graphs with stride-level execution features via cross-attention, and uses an entropy-guided fusion to combine static and dynamic evidence.

## Results
The approach achieves 96.4% parallelism detection accuracy and 86.1% end-to-end generation correctness, surpassing the strongest baseline by +5.0 pp and +11.4 pp respectively.

## Contributions
It introduces an uncertainty-aware learning formulation for parallelism inference, a cross-attention mechanism to incorporate execution signals, and an entropy-guided fusion that leverages dynamic evidence when static analysis is ambiguous.

## Practical relevance
It enables developers to automatically generate efficient parallel CUDA code from serial C, accelerating HPC applications.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149431)
